NAME
amzfs-snapshot - Amanda script to create zfs snapshotDESCRIPTION
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. 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:execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup execute-where clientThe 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. The script is run as the amanda user, it must have the privilege to create and destroy snapshot:
zfs allow -ldu AMANDA_USER mount,snapshot,destroy FILESYSTEMSome 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:
usermod -P "ZFS File System Management,ZFS Storage Management" AMANDA_USERThis will require that your run zfs under pfexec, set the PFEXEC property to YES. The format of the DLE must be one of:
Desciption Example ---------- ------- Mountpoint /data Arbitrary mounted dir /data/interesting_dir ZFS pool name datapool ZFS filesystem datapool/database ZFS logical volume datapool/dbvolThe filesystem must be mounted.
PROPERTIES
This section lists the properties that control amzfs-snapshot's functionality. See amanda-scripts(7) for information on the Script API, script configuration. DF-PATHEXAMPLE
In this example, a dumptype is defined to use amzfs-snapshot script to create a snapshot and use amgtar to backup the snapshot.define script-tool amzfs_snapshot { comment "backup of zfs snapshot" plugin "amzfs-snapshot" execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate, post-dle-estimate, pre-dle-backup, post-dle-backup execute-where client #property "DF-PATH" "/usr/sbin/df" #property "ZFS-PATH" "/usr/sbin/zfs" #property "PFEXEC-PATH" "/usr/sbin/pfexec" #property "PFEXEC" "NO" } define dumptype user-zfs-amgtar { dt_amgtar script "amzfs_snapshot" }
SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7) The Amanda Wiki: : http://wiki.zmanda.com/AUTHORS
Jean-Louis Martineau <[email protected]>Zmanda, Inc. (http://www.zmanda.com)
Dustin J. Mitchell <[email protected]>
Zmanda, Inc. (http://www.zmanda.com)
12/01/2017 | Amanda 3.5.1 |