2 .\" Title: amzfs-snapshot
3 .\" Author: Jean-Louis Martineau <martineau@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
6 .\" Manual: System Administration Commands
7 .\" Source: Amanda 3.2.0
10 .TH "AMZFS\-SNAPSHOT" "8" "10/18/2010" "Amanda 3\&.2\&.0" "System Administration Commands"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 amzfs-snapshot \- Amanda script to create zfs snapshot
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\&.
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:
30 execute\-on pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
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\&.
36 The script is run as the amanda user, it must have the priviledge to create and destroy snapshot:
39 zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
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:
45 usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
47 This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
49 The format of the DLE must be one of:
53 \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-
55 Arbitrary mounted dir /data/interesting_dir
56 ZFS pool name datapool
57 ZFS filesystem datapool/database
58 ZFS logical volume datapool/dbvol
61 The filesystem must be mounted\&.
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\&.
71 Path to the \'df\' binary, search in $PATH by default\&.
77 Path to the \'zfs\' binary, search in $PATH by default\&.
83 Path to the \'pfexec\' binary, search in $PATH by default\&.
89 If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
94 In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
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"
107 define dumptype user\-zfs\-amgtar {
109 script "amzfs_snapshot"
115 \fBamanda.conf\fR(5),
116 \fBamanda-client.conf\fR(5),
117 \fBamanda-scripts\fR(7)
120 : http://wiki.zmanda.com/
123 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
125 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
128 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
130 Zmanda, Inc\&. (http://www\&.zmanda\&.com)