Man pages sections > man8 > zfs-auto-snapshot

zfs-auto-snapshot - take regular ZFS snapshots

ZFS-AUTO-SNAPSHOT(8) System Administration Commands ZFS-AUTO-SNAPSHOT(8)


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.


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.
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 zfs full backup. Unimplemented.
Send zfs incremental backup. Unimplemented.
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.
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.
Command to run after each dataset is snapshotted. It is passed the dataset and snapshot name.
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.
Filesystem and volume names, or '//' for all ZFS datasets.


June 16, 2013