qwertymodo
Contributor
- Joined
- Apr 7, 2014
- Messages
- 144
I currently have a FreeNAS box used for storing backups, and would like to add an additional redundancy with cold storage backups. I have a few open hot-swap bays in the machine, so I was envisioning the process something like this:
*Have 2-3 disks large enough to each hold a full copy of all data I wish to back up (not necessarily the entire contents of the main disk array, but as large as/larger than the allocated size of the relevant datasets), in hot-swap caddies
*Insert one of the disks
*Automatically mount the disk
*Automatically perform a (preferably incremental) backup of the data
*Automatically unmount the disk when done
*Optionally send an email indicating that the backup is complete
*Rotate the disk daily/weekly/whenever, repeat the process
So, now I need to work out the actual details of how to go about this. I don't think there is any functionality already built into FreeNAS to do this, so I'm guessing it would probably require either installing additional software, or possibly even custom scripting. I had a few thoughts that I'd like to get feedback on:
Filesystem: ZFS seems like it could have some beneficial features in this use case, such as built-in compression and snapshots which could be used for the incremental backups. Having the filesystem-level snapshots would mean I could potentially simplify the backup process by just using something like rsync. The downside, of course, is the lack of redundancy of a single-drive pool which could lead to catastrophic data loss from metadata corruption. If ZFS would NOT be recommended in a situation like this, then I'm guessing that ext4 would be the next best choice? Sacrificing the FS snapshots would mean I would need another option for incremental backups.
Software: As I already touched on, the actual backup software could potentially be as simple as using rsync, but are there better options out there? If I do use ZFS, is there anything built into ZFS for replicating a dataset to another pool that might work in a use case like this? Or is there a better option already supported by FreeNAS that I'm overlooking? Or 3rd-party software suggestions?
Automatic un/mounting: Is there anything in FreeNAS that might either help with or hinder the ability to automate the mounting and unmounting process? If nothing else, I can just schedule a cron job to scan for unmounted drives and mount them, and have the backup process unmount the drive when it's done (as well as somehow flagging the cron job so it knows not to re-mount the same drive).
I'm sure I'm not the first person to go down this road, so I'm hoping somebody can provide the benefit of experience.
*Have 2-3 disks large enough to each hold a full copy of all data I wish to back up (not necessarily the entire contents of the main disk array, but as large as/larger than the allocated size of the relevant datasets), in hot-swap caddies
*Insert one of the disks
*Automatically mount the disk
*Automatically perform a (preferably incremental) backup of the data
*Automatically unmount the disk when done
*Optionally send an email indicating that the backup is complete
*Rotate the disk daily/weekly/whenever, repeat the process
So, now I need to work out the actual details of how to go about this. I don't think there is any functionality already built into FreeNAS to do this, so I'm guessing it would probably require either installing additional software, or possibly even custom scripting. I had a few thoughts that I'd like to get feedback on:
Filesystem: ZFS seems like it could have some beneficial features in this use case, such as built-in compression and snapshots which could be used for the incremental backups. Having the filesystem-level snapshots would mean I could potentially simplify the backup process by just using something like rsync. The downside, of course, is the lack of redundancy of a single-drive pool which could lead to catastrophic data loss from metadata corruption. If ZFS would NOT be recommended in a situation like this, then I'm guessing that ext4 would be the next best choice? Sacrificing the FS snapshots would mean I would need another option for incremental backups.
Software: As I already touched on, the actual backup software could potentially be as simple as using rsync, but are there better options out there? If I do use ZFS, is there anything built into ZFS for replicating a dataset to another pool that might work in a use case like this? Or is there a better option already supported by FreeNAS that I'm overlooking? Or 3rd-party software suggestions?
Automatic un/mounting: Is there anything in FreeNAS that might either help with or hinder the ability to automate the mounting and unmounting process? If nothing else, I can just schedule a cron job to scan for unmounted drives and mount them, and have the backup process unmount the drive when it's done (as well as somehow flagging the cron job so it knows not to re-mount the same drive).
I'm sure I'm not the first person to go down this road, so I'm hoping somebody can provide the benefit of experience.