Blob Blame History Raw
'\" t
.\"     Title: amzfs-snapshot
.\"    Author: Jean-Louis Martineau <martineau@zmanda.com>
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: 12/01/2017
.\"    Manual: System Administration Commands
.\"    Source: Amanda 3.5.1
.\"  Language: English
.\"
.TH "AMZFS\-SNAPSHOT" "8" "12/01/2017" "Amanda 3\&.5\&.1" "System Administration Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
amzfs-snapshot \- Amanda script to create zfs snapshot
.SH "DESCRIPTION"
.PP
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\&.
.PP
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:
.sp
.nf
    execute\-on  pre\-dle\-amcheck, post\-dle\-amcheck, pre\-dle\-estimate, post\-dle\-estimate, pre\-dle\-backup, post\-dle\-backup
    execute\-where client
.fi
.PP
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\&.
.PP
The script is run as the amanda user, it must have the privilege to create and destroy snapshot:
.sp
.nf
    zfs allow \-ldu AMANDA_USER mount,snapshot,destroy FILESYSTEM
.fi
.PP
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:
.sp
.nf
usermod \-P "ZFS File System Management,ZFS Storage Management" AMANDA_USER
.fi
This will require that your run zfs under pfexec, set the PFEXEC property to YES\&.
.PP
The format of the DLE must be one of:
.sp
.nf
Desciption              Example
\-\-\-\-\-\-\-\-\-\-              \-\-\-\-\-\-\-
Mountpoint              /data
Arbitrary mounted dir   /data/interesting_dir
ZFS pool name           datapool
ZFS filesystem          datapool/database
ZFS logical volume      datapool/dbvol
.fi
.PP
The filesystem must be mounted\&.
.SH "PROPERTIES"
.PP
This section lists the properties that control amzfs\-snapshot\*(Aqs functionality\&. See
\fBamanda-scripts\fR(7)
for information on the Script API, script configuration\&.
.PP
DF\-PATH
.RS 4

Path to the \*(Aqdf\*(Aq binary, search in $PATH by default\&.
.RE
.PP
ZFS\-PATH
.RS 4

Path to the \*(Aqzfs\*(Aq binary, search in $PATH by default\&.
.RE
.PP
PFEXEC\-PATH
.RS 4

Path to the \*(Aqpfexec\*(Aq binary, search in $PATH by default\&.
.RE
.PP
PFEXEC
.RS 4

If "NO" (the default), pfexec is not used, if set to "YES" then pfexec is used\&.
.RE
.SH "EXAMPLE"


In this example, a dumptype is defined to use amzfs\-snapshot script to create a snapshot and use amgtar to backup the snapshot\&.
.nf
 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"
 }
.fi
.SH "SEE ALSO"
.PP
\fBamanda\fR(8),
\fBamanda.conf\fR(5),
\fBamanda-client.conf\fR(5),
\fBamanda-scripts\fR(7)
.PP
The Amanda Wiki:
: http://wiki.zmanda.com/
.SH "AUTHORS"
.PP
\fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
.RS 4
Zmanda, Inc\&. (http://www\&.zmanda\&.com)
.RE
.PP
\fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
.RS 4
Zmanda, Inc\&. (http://www\&.zmanda\&.com)
.RE