HxHippy

ZFS Snapshot Manager

Create and rotate ZFS snapshots.

Last updated: 2024-12-15

ZFS Snapshot Manager

#!/bin/bash
POOL="zroot"
zfs snapshot "$POOL@auto_$(date +%Y%m%d_%H%M%S)"
# Keep last 24 snapshots
zfs list -t snapshot -o name | grep "$POOL@auto_" | head -n -24 | xargs -r -n1 zfs destroy
intermediate Backup & Recovery Updated 2024-12-15
  • zfs
  • snapshot
  • backup
  • rotation
  • freebsd