Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATASET="data/moodle_data"
- SNAP_NUM=14
- TODAY=$(date +"%Y-%m-%d_%H%M.%S")
- zfs snapshot $DATASET@auto_$TODAY
- zfs list -t snapshot -o name -S creation | grep data@auto | tail -n +$(($SNAP_NUM+1)) | xargs -n 1 zfs destroy -vr
Add Comment
Please, Sign In to add comment