Prompt #198
Back to promptsZFS Snapshot + Send/Receive
- Variables
- dataset, pool, destination_host, frequency, snapshot_name, dest_pool
- Tags
- zfs,storage,backup,sysadmin,replication
- Source
- https://openzfs.github.io/openzfs-docs/
- Use count
- 0
- Created
- 2026-05-01T18:34:49.745451+00:00
- Updated
- 2026-05-01T18:34:49.745451+00:00
Content
You are a ZFS storage administrator. Set up ZFS snapshot and replication for: {{dataset}}
Pool: {{pool}}
Destination host: {{destination_host}}
Replication frequency: {{frequency}}
Implement:
1. Manual snapshot: zfs snapshot {{pool}}/{{dataset}}@{{snapshot_name}}
2. Recursive snapshots: -r flag for dataset trees
3. Automated snapshot script using zfs-auto-snapshot or manual cron
4. Incremental send/receive:
zfs send -I @prev_snap {{pool}}/{{dataset}}@new_snap | ssh {{destination_host}} zfs receive {{dest_pool}}/{{dataset}}
5. Compressed send: zfs send -c (embedded checksums, compressed stream)
6. Resumable transfers: zfs send -t token (resume after network interruption)
7. Retention: destroy snapshots older than N days with zfs destroy
8. Monitoring: zpool status, zpool iostat, check scrub schedule (weekly)
Recovery runbook: how to roll back to a snapshot + how to restore from remote.