I’m finally getting around to setting up backups for some of the services and databases that I’m running on my home network. The general idea is to run daily backups to a share on my main FreeNAS box and then replicate for a second and third backup copy. I realize there’s quite a few ways that this could be done, including whether and how to use separate files or snapshots to manage backup retention. I suspect I’m not the first one setting up something like this. I would therefore love to hear what you guys have tried, what you have learned, and what your setups look like today.
My main requirement is to have easy access to a number of backups of, say a database, stretching back in time. Ideally something similar to tape backups with a grandfather-father-son rotation scheme.
Some thoughts: One option would be to do a daily backup with the date in the file name and use a script to remove old copies that should no longer be retained. These backups would be really easy to access, but there would also be a risk of removing or corrupting all backups in one go. ZFS snapshots could be used to prevent direct altering, but would increase the number of backups stored (e.g. weekly snapshots kept for 10 weeks combined with daily backup files kept for one week practically means storing 10 weeks of backups at any one time). Another option would be to only keep one daily backup on the ZFS share and handle retention through daily snapshots. There is still a risk of removing snapshots by mistake, but at least it will not be possible for a virus to encrypt all backups in one go. How are you guys going about this?
For clarity: This thread is about backing up databases, GIT-repositories, Seafile libraries, e-mail accounts and other data using FreeNAS as the “backup media”, not about how to back up data already on a FreeNAS dataset. While interesting and relevant, the latter subject has been discussed extensively in other threads on the forum.
I look forward to hearing what you guys are doing.
My main requirement is to have easy access to a number of backups of, say a database, stretching back in time. Ideally something similar to tape backups with a grandfather-father-son rotation scheme.
Some thoughts: One option would be to do a daily backup with the date in the file name and use a script to remove old copies that should no longer be retained. These backups would be really easy to access, but there would also be a risk of removing or corrupting all backups in one go. ZFS snapshots could be used to prevent direct altering, but would increase the number of backups stored (e.g. weekly snapshots kept for 10 weeks combined with daily backup files kept for one week practically means storing 10 weeks of backups at any one time). Another option would be to only keep one daily backup on the ZFS share and handle retention through daily snapshots. There is still a risk of removing snapshots by mistake, but at least it will not be possible for a virus to encrypt all backups in one go. How are you guys going about this?
For clarity: This thread is about backing up databases, GIT-repositories, Seafile libraries, e-mail accounts and other data using FreeNAS as the “backup media”, not about how to back up data already on a FreeNAS dataset. While interesting and relevant, the latter subject has been discussed extensively in other threads on the forum.
I look forward to hearing what you guys are doing.