Backup ZFS snapshots to tape (both full and diff)

backuptapezfs

What would be the best way to implement an LTO tape-based backup system on a ZFS fileserver? I've got about 6TB that need to be backed up on a daily basis, along with an existing HP 1840 LTO4 tape drive and a bunch of tapes.

I've already got the ZFS doing automatic snapshots every day, but now want to add a layer of offline storage to this. Ideally, the resulting system would implement some sort of father/son rotation system, so I have daily diff tapes for the last two weeks along with a full backup every week.

Reading around, I've seen that some people have used a combination of zfs send / dd / tar to achieve this, but it's not clear to me exactly how this should be implemented.

Update

I've just read about zfs send -i which supposedly sends the increment between two different snapshots. While I feared this whole exercise might make me write some scripts, that should make the diff backup task a little easier. Still no idea how to handle tape changes via a script though.

Best Answer

Take a look at the ZFS Best Practices Guide, especially the section Saving ZFS Data*. I don't think tape backups are ideal for backing up snapshots. You'd be better off telling your tape backup system to backup the ZFS filesystem itself & ignore the .zfs snapshot directory. Main thing is you just want software that understands all attributes of a ZFS filesystem. I'd suggest Bacula for that.

zfs send is for cloning data from one ZFS system to another, not for sending data to tape.

NOTE: Link used to go to:

http://www. solarisinternals .com/wiki/index.php/ ZFS_Best_Practices_Guide#Recommendations_for_Saving_ZFS_Data

But that site is now dead and the may be malicious. Name of the linked page included in case it helps anyone search.