67e1042cfc57b48d065e835d20b105b59e3bc387
[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: 11/05/2009
6 .\"    Manual: System Administration Commands
7 .\"    Source: Amanda 2.6.1p2
8 .\"  Language: English
9 .\"
10 .TH "AMZFS\-SNAPSHOT" "8" "11/05/2009" "Amanda 2\&.6\&.1p2" "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
26 \fIAmanda\fR
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\&.
28 .PP
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:
30 .sp
31 .nf
32     execute\-on  pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
33     execute\-where client
34 .fi
35 .PP
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\&.
37 .PP
38 The script is run as the amanda user, it must have the priviledge to create and destroy snapshot:
39 .sp
40 .nf
41     zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
42 .fi
43 .PP
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:
45 .sp
46 .nf
47 usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
48 .fi
49 This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
50 .PP
51 The format of the DLE must be one of:
52 .sp
53 .nf
54 Desciption              Example
55 \-\-\-\-\-\-\-\-\-\-              \-\-\-\-\-\-\-
56 Mountpoint              /data
57 Arbitrary mounted dir   /data/interesting_dir
58 ZFS pool name           datapool
59 ZFS filesystem          datapool/database
60 ZFS logical volume      datapool/dbvol
61 .fi
62 .PP
63 The filesystem must be mounted\&.
64 .SH "PROPERTIES"
65 .PP
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\&.
69 .PP
70 DF\-PATH
71 .RS 4
72
73 Path to the \'df\' binary, search in $PATH by default\&.
74 .RE
75 .PP
76 ZFS\-PATH
77 .RS 4
78
79 Path to the \'zfs\' binary, search in $PATH by default\&.
80 .RE
81 .PP
82 PFEXEC\-PATH
83 .RS 4
84
85 Path to the \'pfexec\' binary, search in $PATH by default\&.
86 .RE
87 .PP
88 PFEXEC
89 .RS 4
90
91 If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
92 .RE
93 .SH "EXAMPLE"
94
95
96 In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
97 .nf
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"
107  }
108
109  define dumptype user\-zfs\-amgtar {
110    dt_amgtar
111    script "amzfs_snapshot"
112  }
113 .fi
114 .SH "SEE ALSO"
115 .PP
116
117 \fBamanda.conf\fR(5),
118 \fBamanda-client.conf\fR(5),
119 \fBamanda-scripts\fR(7)
120 .SH "AUTHORS"
121 .PP
122 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
123 .RS 4
124 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
125 .RE
126 .PP
127 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
128 .RS 4
129 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
130 .RE