This content has been marked as final. Show 2 replies
williamcastrod wrote:There are many solutions. And you might try amanda also.
I think this is an old issue, but I'm not sure if it was solved yet.
Someone has a shell script in order to backup to tape a ZFS filesystem in Solaris 10, by using gtar.I don't know. I dont. But I'll give a couple of pointers:
If it is not possible, why?It is certainly possilble. There are few different ways of dong this. And there a a couple of possilbe gotchas as well ... eg relating to zfs filesystem hidden files.
ThanksDo do a file bacsed backup checkout gtar t oa file ....
... which seems to be getting the correct result
root@solaris:/export# zfs create rpool/export/wtest root@solaris:/export# zfs create rpool/export/wtest/wchild root@solaris:/export# touch /export/wtest/file1.txt root@solaris:/export# touch /export/wtest/file2.txt root@solaris:/export# touch /export/wtest/wchild/file3.txt root@solaris:/export# (cd $(zfs list -H -o mountpoint rpool/export/wtest); gtar cpf - --one-file-system . ) | gzip > wtest.tar.gz root@solaris:/export# gtar tvpf wtest.tar.gz drwxr-xr-x root/root 0 2013-01-19 00:20 ./ -rw-r--r-- root/root 0 2013-01-19 00:20 ./file2.txt drwxr-xr-x root/root 0 2013-01-19 00:21 ./wchild/ -rw-r--r-- root/root 0 2013-01-19 00:20 ./file1.txt
Obviosuly we could goto tape with something like:-
(cd $(zfs list -H -o mountpoint rpool/export/wtest); gtar cpf /dev/rmt/0 --one-file-system . )
... but this ignores blocking factors which may be important for a not trivial amount of data.
(cd $(zfs list -H -o mountpoint rpool/export/wtest); gtar cpbf 96 /dev/rmt/0 --one-file-system . )
Another apporpchs is to take a snapshort of the zfs filesystme and back that up .....
This is not a file based backup! And dont run the command if you dont have /dev/rmt/0 device!
zfs send rpool/export/wtest@fortape | dd obs=49152 of=/dev/rmt/0
Please be aware I am rusty on tapes, and may have made mistakes. And testing this and brining it up to production quality is for you. I hate tapes. Restores sometimes go wrong .. and it get exciting ... when you discover the backup was not all you thought it was!
Edited by: bigdelboy on Jan 18, 2013 11:59 PM NB: Having turned off my computer for going to bed I mused the block sizes given above are probably inappropriately low for modern tape drives (ok for 8GB exabytes!)