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 2.6.1p1
10 .TH "AMZFS\-SNAPSHOT" "8" "04/10/2009" "Amanda 2\&.6\&.1p1" "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
27 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\&.
29 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:
32 execute\-on pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
36 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\&.
38 The script is run as the amanda user, it must have the priviledge to create and destroy snapshot:
41 zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
44 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:
47 usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
49 This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
51 The format of the DLE must be one of:
55 \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-
57 Arbitrary mounted dir /data/interesting_dir
58 ZFS pool name datapool
59 ZFS filesystem datapool/database
60 ZFS logical volume datapool/dbvol
63 The filesystem must be mounted\&.
66 This section lists the properties that control amzfs\-snapshot\'s functionality\&. See
67 \fBamanda-scripts\fR(7)
68 for information on the Script API, script configuration\&.
73 Path to the \'df\' binary, search in $PATH by default\&.
79 Path to the \'zfs\' binary, search in $PATH by default\&.
85 Path to the \'pfexec\' binary, search in $PATH by default\&.
91 If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
96 In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
98 define script\-tool amzfs_snapshot {
99 comment "backup of zfs snapshot"
100 plugin "amzfs\-snapshot"
101 execute\-on pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
102 execute\-where client
103 #property "DF\-PATH" "/usr/sbin/df"
104 #property "ZFS\-PATH" "/usr/sbin/zfs"
105 #property "PFEXEC\-PATH" "/usr/sbin/pfexec"
106 #property "PFEXEC" "NO"
109 define dumptype user\-zfs\-amgtar {
111 script "amzfs_snapshot"
117 \fBamanda.conf\fR(5),
118 \fBamanda-client.conf\fR(5),
119 \fBamanda-scripts\fR(7)
122 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
124 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
127 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
129 Zmanda, Inc\&. (http://www\&.zmanda\&.com)