Skip to content
/ zfsSnap Public

Simple zfs snapshot script with no dependencies

Notifications You must be signed in to change notification settings

i0x71/zfsSnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

zfsSnap

ZFS Snapshot automatic create/destroy script

root@swamp:/swamptank/scripts# ./zfsSnap.sh

./zfsSnap.sh [create|destroy] [snapshotName] [olderThan]

Examples

root@host:~# ./zfsSnap.sh create tank/media@minute

root@host:~# ./zfsSnap.sh destroy tank/media@minute 60

Crontab examples

Hourly

0 * * * * /tank/scripts/zfsSnap.sh create tank/media@hourly

0 * * * * /tank/scripts/zfsSnap.sh destroy tank/media@hourly 3600

Daily

@daily /tank/scripts/zfsSnap.sh create tank/media@daily

@daily /tank/scripts/zfsSnap.sh destroy tank/media@daily 86400

Weekly

@weekly /tank/scripts/zfsSnap.sh create tank/media@weekly

@weekly /tank/scripts/zfsSnap.sh destroy tank/media@weekly 604800

Monthly

@monthly /tank/scripts/zfsSnap.sh create tank/media@autoMonthly

** Keep monthly for 15552000 (6 months) **

@monthly /tank/scripts/zfsSnap.sh destroy tank/media@autoMonthly 15552000

3600 seconds is 1 hour | 86400 seconds is 24 hours | 604800 seconds is 7 days

About

Simple zfs snapshot script with no dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages