zfs

zfscron - A great idea from the BSDNow podcast

First off, if you are interested in all of the latest news and information on the BSD operating systems, you should checkout the [BSDNow] (http://www.bsdnow.tv) podcast. In the segment where Allan Jude and Kris Moore discuss viewer’s questions, Allan was talking about creating zfs snapshots of your home directory every 30 minutes or so. This seemed like a great idea to capture changes that may have occurred since the last daily backup in your user home directory. zfscron.sh has been added to the zfsbackup scripts and only needs to be setup as a cronjob for a user account that has privilege to perform zfs snapshots.

$ crontab -e 
(Then add the following to setup the cronjob for the user):
*/30 * * * * /usr/home/test/zfscron.sh

Now as you work throughout the day, snapshots will be rolled every 30 minutes, allowing you to go back if you have accidentally deleted files or directories from your user account within the past hour.

zfscron.sh on github: https://github.com/shirkdog/zfsbackup/blob/master/zfscron.sh

Copyright © 2024 Daemon Security Inc. | Privacy Policy
Terms and Conditions