Backup ZFS snapshots to tape (both full and diff)

Solution 1:

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.

Solution 2:

Your best bet may be to send the contents of a ZFS snapshot to tape (e.g. via tar), rather than the snapshot itself. It seems fairly common to take advantage of LVM snapshots to facilitate writing live file systems to tape, and I see no reason why you should not take advantage of ZFS snapshots instead, in much the same way. As you note, using a snapshot essentially eliminates the risk of the files changing during the backup process.

One advantage of ZFS snapshots over LVM snapshots is that you can keep ZFS snapshots afterwards without likely suffering much of a performance penalty. (By contrast, it is popular to delete LVM snapshots after backing up their contents to tape.)

Tags:

Backup

Zfs

Tape