1AMZFS-SNAPSHOT(8) System Administration Commands AMZFS-SNAPSHOT(8)
2
3
4
6 amzfs-snapshot - Amanda script to create zfs snapshot
7
9 amzfs-snapshot is an Amanda script implementing the Script API. It
10 should not be run by users directly. It create a zfs snapshot of the
11 filesystem where the path specified is mounted.
12
13 PRE-DLE-* create a snapshot and the POST-DLE-* destroy the snapshot,
14 *-DLE-AMCHECK, *-DLE-ESTIMATE and *-DLE-BACKUP must be set to be
15 executed on the client:
16
17 execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup
18 execute-where client
19
20 The PRE_DLE_* script output a DIRECTORY property telling where the
21 directory is located in the snapshot. The application must be able to
22 use the DIRECTORY property, amgtar can do it.
23
24 The script is run as the amanda user, it must have the priviledge to
25 create and destroy snapshot:
26
27 zfs allow -ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
28
29 Some system doesn´t have "zfs allow", but you can give the Amanda
30 backup user the rights to manipulate ZFS filesystems by using the
31 following command:
32
33 usermod -P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
34 This will require that your run zfs under pfexec, set the PFEXEC
35 property to YES.
36
37 The format of the DLE must be one of:
38
39 Desciption Example
40 ---------- -------
41 Mountpoint /data
42 Arbitrary mounted dir /data/interesting_dir
43 ZFS pool name datapool
44 ZFS filesystem datapool/database
45 ZFS logical volume datapool/dbvol
46
47 The filesystem must be mounted.
48
50 This section lists the properties that control amzfs-snapshot´s
51 functionality. See amanda-scripts(7) for information on the Script API,
52 script configuration.
53
54 DF-PATH
55
56 Path to the ´df´ binary, search in $PATH by default.
57
58 ZFS-PATH
59
60 Path to the ´zfs´ binary, search in $PATH by default.
61
62 PFEXEC-PATH
63
64 Path to the ´pfexec´ binary, search in $PATH by default.
65
66 PFEXEC
67
68 If "NO" (the default), pfexec is not used, if set to "YES" then
69 pfexec is used.
70
72 In this example, a dumptype is defined to use amzfs-snapshot script to
73 create a snapshot and use amgtar to backup the snapshot.
74 define script-tool amzfs_snapshot {
75 comment "backup of zfs snapshot"
76 plugin "amzfs-snapshot"
77 execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup
78 execute-where client
79 #property "DF-PATH" "/usr/sbin/df"
80 #property "ZFS-PATH" "/usr/sbin/zfs"
81 #property "PFEXEC-PATH" "/usr/sbin/pfexec"
82 #property "PFEXEC" "NO"
83 }
84
85 define dumptype user-zfs-amgtar {
86 dt_amgtar
87 script "amzfs_snapshot"
88 }
89
91 amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)
92
93 The Amanda Wiki: : http://wiki.zmanda.com/
94
96 Jean-Louis Martineau <martineau@zmanda.com>
97 Zmanda, Inc. (http://www.zmanda.com)
98
99 Dustin J. Mitchell <dustin@zmanda.com>
100 Zmanda, Inc. (http://www.zmanda.com)
101
102
103
104Amanda 3.1.3 10/04/2010 AMZFS-SNAPSHOT(8)