Define a retention policy (12 hourly, 30 daily, 6 monthly) in Sanoid's config file and let it automatically create and delete ZFS snapshots on a cron schedule.
Use Syncoid to replicate ZFS snapshots from one machine to an offsite server over SSH, sending only incremental changes each run.
Add Sanoid's monitoring commands to a Nagios or similar monitoring system to alert when snapshot health or pool status degrades.
Run a hook script before each snapshot to quiesce a database so the snapshot captures a consistent state.
Requires Linux and OpenZFS, Sanoid itself is a Perl script run via cron, no complex build step, but you must configure ZFS datasets first.
Sanoid is a tool that automatically manages snapshots on ZFS storage systems. A snapshot is a frozen copy of your data at a specific moment in time, which you can use to recover files or roll back an entire system to an earlier state. Without a tool like Sanoid, creating and cleaning up snapshots is a manual process that most people skip, leaving them without backups when something goes wrong. The way Sanoid works is through a plain-text configuration file where you define policies: how many hourly, daily, weekly, monthly, and yearly snapshots to keep for each storage dataset. Sanoid then runs on a schedule (typically every minute via a system cron job) and handles both creating new snapshots and deleting expired ones according to those policies. The configuration supports templates, so you can define a standard policy once and apply it across many datasets without repeating yourself. The tool also includes monitoring commands that report on snapshot health and storage pool status, designed to work with Nagios-style monitoring systems. There are optional hooks that let you run your own scripts before or after a snapshot is taken, or when one is pruned, which is useful if you need to quiesce a database or notify another system around snapshot events. A companion tool called Syncoid handles replication: copying snapshots from one machine or pool to another over SSH. This is how you get offsite or cross-server backups. Syncoid works incrementally, sending only the differences since the last transfer rather than copying everything each time. Sanoid runs on Linux and requires OpenZFS. The project is free software under the GPL v3 license. The README notes that Btrfs support was previously planned but has been shelved until Btrfs is considered sufficiently reliable. The project is maintained by the author of the Practical ZFS forum and book.
← jimsalterjrs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.