ZFS-AUTO-SNAPSHOT(8)

✨ NAME ✨

zfs-auto-snapshot β€” the girl that takes regular ZFS snapshots for you πŸ’…

okay so bestie, welcome to the zfs-auto-snapshot(8) page from the System Administration Commands section. she's an 8, she's iconic, she's about to make your datasets immortal. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

zfs-auto-snapshot [options] [-l label] <'//' | name [name...]>

that's it. that's the whole vibe check. ✨


🌸 DESCRIPTION 🌸

zfs-auto-snapshot automatically creates, rotates, and destroys snapshots for all your ZFS datasets. no cap. she does the whole thing by herself.

and she's compatible with both zfsonlinux and zfs-fuse β€” so whoever your ZFS provider is, she's not gonna ghost you. πŸ’–


πŸ‘‘ OPTIONS πŸ‘‘

like forty options and every single one is serving. let's go. πŸŽ€

  • --default-exclude β€” so by default, zfs-auto-snapshot snapshots all datasets except the ones where the user-property com.sun:auto-snapshot is set to false. this option flips the whole thing around and requires com.sun:auto-snapshot to be set to true instead. reversal arc, slay.
  • -d, --debug β€” prints debugging messages. she's telling you everything, fr fr. πŸ›
  • -e, --event=EVENT β€” sets the com.sun:auto-snapshot-desc property to EVENT. label your moment bestie.
  • --fast β€” uses a faster zfs list invocation. speed demon energy. ⚑
  • -n, --dry-run β€” prints out the actions without actually doing anything. window shopping, no checkout. πŸ›οΈ
  • -s, --skip-scrub β€” do not snapshot filesystems that live in scrubbing pools. let them scrub in peace bestie.
  • -h, --help β€” prints the usage message. the "help me help you" option. πŸ™ˆ
  • -k, --keep=NUM β€” keep NUM recent snapshots and destroy the older ones. the rotation queen. πŸ‘‘
  • -l, --label=LAB β€” LAB is usually 'hourly', 'daily', or 'monthly'. pick your era.
  • -p, --prefix=PRE β€” PRE is 'zfs-auto-snap' by default. change it if you want a different name for your babies.
  • -q, --quiet β€” suppresses warnings and notices at the console. shhh. 🀫
  • --send-full=F β€” send zfs full backup. Unimplemented. girl is not built yet, don't come for her. πŸ’€
  • --send-incr=F β€” send zfs incremental backup. Unimplemented. same situation. 😭
  • --sep=CHAR β€” use CHAR to separate the date stamps in snapshot names. pick your separator, make it cute.
  • -g, --syslog β€” writes messages into the system log. receipts, but in /var/log. 🧚
  • -r, --recursive β€” snapshot the named filesystem and all descendants. the whole family tree, no one left behind. 🌈
  • -v, --verbose β€” prints info messages. she's chatty and we love that.
  • --pre-snapshot=COMMAND β€” a command to run before each dataset is snapshotted. it gets passed the dataset and snapshot name. and if it returns non-zero? snapshotting this dataset is aborted. like, dead stop. ⚠️
  • --post-snapshot=COMMAND β€” a command to run after each dataset is snapshotted. it also gets passed the dataset and snapshot name. aftercare, we love to see it. πŸ’œ
  • --destroy-only β€” do not create new snapshots, but do destroy older snapshots. also, heads up: this has no effect unless used with -k. bestie that's important.

a non-obvious use may be construction 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. πŸ’… iykyk.

  • name β€” filesystem and volume names, or '//' for all ZFS datasets. the '//' is the "everybody" option. ✨

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page bestie!! this absolute icon lives in zfs-auto-snapshot.sh, dated June 16, 2013 β€” and yeah, ZFS-AUTO-SNAPSHOT(8) is her full government name. go forth and snapshot responsibly πŸŽ€πŸ’–βœ¨