Imported Upstream version 3.3.2
[debian/amanda] / man / amzfs-snapshot.8
1 '\" t
2 .\"     Title: amzfs-snapshot
3 .\"    Author: Jean-Louis Martineau <martineau@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 07/25/2012
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 3.3.2
8 .\"  Language: English
9 .\"
10 .TH "AMZFS\-SNAPSHOT" "8" "07/25/2012" "Amanda 3\&.3\&.2" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 amzfs-snapshot \- Amanda script to create zfs snapshot
32 .SH "DESCRIPTION"
33 .PP
34 amzfs\-snapshot is an Amanda script implementing the Script API\&. It should not be run by users directly\&. It create a zfs snapshot of the filesystem where the path specified is mounted\&.
35 .PP
36 PRE\-DLE\-* create a snapshot and the POST\-DLE\-* destroy the snapshot, *\-DLE\-AMCHECK, *\-DLE\-ESTIMATE and *\-DLE\-BACKUP must be set to be executed on the client:
37 .sp
38 .nf
39     execute\-on  pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
40     execute\-where client
41 .fi
42 .PP
43 The PRE_DLE_* script output a DIRECTORY property telling where the directory is located in the snapshot\&. The application must be able to use the DIRECTORY property, amgtar can do it\&.
44 .PP
45 The script is run as the amanda user, it must have the priviledge to create and destroy snapshot:
46 .sp
47 .nf
48     zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
49 .fi
50 .PP
51 Some system doesn\*(Aqt have "zfs allow", but you can give the Amanda backup user the rights to manipulate ZFS filesystems by using the following command:
52 .sp
53 .nf
54 usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
55 .fi
56 This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
57 .PP
58 The format of the DLE must be one of:
59 .sp
60 .nf
61 Desciption              Example
62 \-\-\-\-\-\-\-\-\-\-              \-\-\-\-\-\-\-
63 Mountpoint              /data
64 Arbitrary mounted dir   /data/interesting_dir
65 ZFS pool name           datapool
66 ZFS filesystem          datapool/database
67 ZFS logical volume      datapool/dbvol
68 .fi
69 .PP
70 The filesystem must be mounted\&.
71 .SH "PROPERTIES"
72 .PP
73 This section lists the properties that control amzfs\-snapshot\*(Aqs functionality\&. See
74 \fBamanda-scripts\fR(7)
75 for information on the Script API, script configuration\&.
76 .PP
77 DF\-PATH
78 .RS 4
79
80 Path to the \*(Aqdf\*(Aq binary, search in $PATH by default\&.
81 .RE
82 .PP
83 ZFS\-PATH
84 .RS 4
85
86 Path to the \*(Aqzfs\*(Aq binary, search in $PATH by default\&.
87 .RE
88 .PP
89 PFEXEC\-PATH
90 .RS 4
91
92 Path to the \*(Aqpfexec\*(Aq binary, search in $PATH by default\&.
93 .RE
94 .PP
95 PFEXEC
96 .RS 4
97
98 If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
99 .RE
100 .SH "EXAMPLE"
101
102
103 In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
104 .nf
105  define script\-tool amzfs_snapshot {
106    comment "backup of zfs snapshot"
107    plugin  "amzfs\-snapshot"
108    execute\-on  pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
109    execute\-where client
110    #property "DF\-PATH" "/usr/sbin/df"
111    #property "ZFS\-PATH" "/usr/sbin/zfs"
112    #property "PFEXEC\-PATH" "/usr/sbin/pfexec"
113    #property "PFEXEC" "NO"
114  }
115
116  define dumptype user\-zfs\-amgtar {
117    dt_amgtar
118    script "amzfs_snapshot"
119  }
120 .fi
121 .SH "SEE ALSO"
122 .PP
123 \fBamanda\fR(8),
124 \fBamanda.conf\fR(5),
125 \fBamanda-client.conf\fR(5),
126 \fBamanda-scripts\fR(7)
127 .PP
128 The Amanda Wiki:
129 : http://wiki.zmanda.com/
130 .SH "AUTHORS"
131 .PP
132 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
133 .RS 4
134 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
135 .RE
136 .PP
137 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
138 .RS 4
139 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
140 .RE