zfs-auto-snapshot - take regular ZFS snapshots
zfs-auto-snapshot [options] [-l label]
<'//' | name [name...]>
zfs-auto-snapshot automatically creates, rotates, and
destroys snapshots for all your ZFS datasets, and is compatible with both
zfsonlinux and zfs-fuse.
- --default-exclude
- By default zfs-auto-snapshot will snapshot all datasets except for
those in which the user-property com.sun:auto-snapshot is set to
false. This option reverses the behavior and requires
com.sun:auto-snapshot to be set to true.
- -d, --debug
- Print debugging messages.
- -e,
--event=EVENT
- Set the com.sun:auto-snapshot-desc property to EVENT.
- --fast
- Use a faster zfs list invocation.
- -n, --dry-run
- Print actions without actually doing anything.
- -s,
--skip-scrub
- Do not snapshot filesystems in scrubbing pools.
- -h, --help
- Print the usage message.
- -k,
--keep=NUM
- Keep NUM recent snapshots and destroy older snapshots.
- -l,
--label=LAB
- LAB is usually 'hourly', 'daily', or 'monthly'.
- -p,
--prefix=PRE
- PRE is 'zfs-auto-snap' by default.
- -q, --quiet
- Suppress warnings and notices at the console.
- --send-full=F
- Send zfs full backup. Unimplemented.
- --send-incr=F
- Send zfs incremental backup. Unimplemented.
- --sep=CHAR
- Use CHAR to separate date stamps in snapshot names.
- -g, --syslog
- Write messages into the system log.
- -r,
--recursive
- Snapshot named filesystem and all descendants.
- -v, --verbose
- Print info messages.
- --pre-snapshot=COMMAND
- Command to run before each dataset is snapshotted. It is passed the
dataset and snapshot name. If it returns non-zero, snapshotting this
dataset is aborted.
- --post-snapshot=COMMAND
- Command to run after each dataset is snapshotted. It is passed the dataset
and snapshot name.
- --destroy-only
- Do not create new snapshots, but do destroy older snapshots. Has no effect
unless used with -k.
- A non-obvious use may be constructon of cron jobs or scripts that run
pre-snapshot command(s), then run zfs-auto-snapshot (without -k) to
quickly snapshot all datasets, then run post-snapshot command(s) and clean
up with zfs-auto-snapshot --destroy-only.
- name
- Filesystem and volume names, or '//' for all ZFS datasets.