2 .\" Title: amzfs-snapshot
3 .\" Author: Jean-Louis Martineau <martineau@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: System Administration Commands
7 .\" Source: Amanda 3.3.1
10 .TH "AMZFS\-SNAPSHOT" "8" "02/21/2012" "Amanda 3\&.3\&.1" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 amzfs-snapshot \- Amanda script to create zfs snapshot
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\&.
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:
39 execute\-on pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
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\&.
45 The script is run as the amanda user, it must have the priviledge to create and destroy snapshot:
48 zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
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:
54 usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
56 This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
58 The format of the DLE must be one of:
62 \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-
64 Arbitrary mounted dir /data/interesting_dir
65 ZFS pool name datapool
66 ZFS filesystem datapool/database
67 ZFS logical volume datapool/dbvol
70 The filesystem must be mounted\&.
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\&.
80 Path to the \*(Aqdf\*(Aq binary, search in $PATH by default\&.
86 Path to the \*(Aqzfs\*(Aq binary, search in $PATH by default\&.
92 Path to the \*(Aqpfexec\*(Aq binary, search in $PATH by default\&.
98 If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
103 In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
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"
116 define dumptype user\-zfs\-amgtar {
118 script "amzfs_snapshot"
124 \fBamanda.conf\fR(5),
125 \fBamanda-client.conf\fR(5),
126 \fBamanda-scripts\fR(7)
129 : http://wiki.zmanda.com/
132 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
134 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
137 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
139 Zmanda, Inc\&. (http://www\&.zmanda\&.com)