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