2026-10-10 17:12:17 +02:00
2026-10-10 17:18:12 +02:00
2026-10-10 17:12:17 +02:00
2026-10-10 17:12:17 +02:00

README

zfs-auto-snapshot automatically creates and rotates periodic snapshots of all ZFS filesystems and volumes.
The script automatically rotates snapshots by pruning older ones beyond the retention limit.
The script temporarily skips snapshots on damaged pools or pools with an active scrub.

It creates:

  • 4 snapshots per hour (rotated every 15 minutes)
  • 24 hourly snapshots
  • 31 daily snapshots
  • 12 weekly snapshots
  • 12 monthly snapshots

Script is tested on Linux (AlmaLinux 9, CentOS/RHEL 7-9, OpenZFS 2.x / 0.8.x).
Originally adapted from https://github.com/zfsonlinux/zfs-auto-snapshot

Installation

make install

Uninstallation

make uninstall

Note

Uninstalling the script does not delete existing snapshots.

CLI Parameters

  • --keep: Number of snapshots to preserve (default: 10).
  • --label: Label tag for snapshots (default: defaultLabel).
  • --threshold: Minimum bytes written to the dataset since the last snapshot to trigger a new one (default: 0).
  • --prefix: Snapshot name prefix (default: zfs-auto-snap).
Description
ZFS Automatic Snapshots Management - Make automatic snaps with retention policy
Readme 44 KiB
Languages
Shell 81.7%
Makefile 18.3%