Sergey
2008-Jan-31 16:43 UTC
[zfs-discuss] How to do "zfs send" to remote tape drive without intermediate file?
Hi list, I''d like to be able to store zfs filesystems on a tape drive that is attached to another Solaris U4 x86 server. The idea is to use "zfs send" together with tar in order to get the list of the filesystems'' snapshots stored on a tape and be able to perform a restore operation later. It''s pretty nice to use tar to get a content of the tape in human-readable form. How can I do it in-one-command without intermediate file? The file ifself can be done using "zfs send tank/filesystem at snapshot > /path/to/filesystem_snapshot.zfs" ? But it''s painfull to reserve pretty large amount if disk space to store intermidiate .zfs file.. Of course, I can write to remote type using ssh using the command below but I''d lile to see some kind of meaningful names on the tape: # zfs send tank/filesystem at snapshot | ssh remote_server "cat > /dev/rmt/0bn" Thanks, Sergey This message posted from opensolaris.org
J.P. King
2008-Jan-31 16:57 UTC
[zfs-discuss] How to do "zfs send" to remote tape drive without intermediate file?
> Hi list, > > I''d like to be able to store zfs filesystems on a tape drive that is > attached to another Solaris U4 x86 server. The idea is to use "zfs send" > together with tar in order to get the list of the filesystems'' snapshots > stored on a tape and be able to perform a restore operation later. It''s > pretty nice to use tar to get a content of the tape in human-readable > form.I don''t think you want to do this. Unless there has been a change of heart you can''t rely on zfs receive accepting the zfs send from an old dump file. It is only guaranteed to work for the same version of zfs/the zfs tools. If there has been a change of heart then I want to know about it.> How can I do it in-one-command without intermediate file? > > The file ifself can be done using "zfs send tank/filesystem at snapshot > > /path/to/filesystem_snapshot.zfs" ? But it''s painfull to reserve pretty > large amount if disk space to store intermidiate .zfs file..Bearing in mind that I don''t think you want to do this.. zfs send tank/filesystem at snapshot | ssh remote_server \( command_to_label_tape \; dd of=/dev/rmt/0bn \)> Of course, I can write to remote type using ssh using the command below > but I''d lile to see some kind of meaningful names on the tape: > > # zfs send tank/filesystem at snapshot | ssh remote_server "cat > > /dev/rmt/0bn"What kind of name do you want? Where do you want it. There are loads of ways. Starting from echo "tank/filesystem at snapshot `date`" > /dev/rmt/0bn upwards.> Thanks, SergeyJulian -- Julian King Computer Officer, University of Cambridge, Unix Support
Richard Elling
2008-Jan-31 18:02 UTC
[zfs-discuss] How to do "zfs send" to remote tape drive without intermediate file?
Sergey wrote:> Hi list, > > I''d like to be able to store zfs filesystems on a tape drive that is attached to > another Solaris U4 x86 server. The idea is to use "zfs send" together with tar in order to get the list of the filesystems'' snapshots stored on a tape and be able to perform a restore operation later. It''s pretty nice to use tar to get a content of the tape in human-readable form. > > How can I do it in-one-command without intermediate file? > > The file ifself can be done using "zfs send tank/filesystem at snapshot > /path/to/filesystem_snapshot.zfs" ? But it''s painfull to reserve pretty large amount if disk space to store intermidiate .zfs file.. > > Of course, I can write to remote type using ssh using the command below but I''d lile to see some kind of meaningful names on the tape: > > # zfs send tank/filesystem at snapshot | ssh remote_server "cat > /dev/rmt/0bn" >close. mt(1) is the command you want rather than cat. -- richard
Richard Elling
2008-Jan-31 18:09 UTC
[zfs-discuss] How to do "zfs send" to remote tape drive without intermediate file?
Richard Elling wrote:> Sergey wrote: > >> Hi list, >> >> I''d like to be able to store zfs filesystems on a tape drive that is attached to >> another Solaris U4 x86 server. The idea is to use "zfs send" together with tar in order to get the list of the filesystems'' snapshots stored on a tape and be able to perform a restore operation later. It''s pretty nice to use tar to get a content of the tape in human-readable form. >> >> How can I do it in-one-command without intermediate file? >> >> The file ifself can be done using "zfs send tank/filesystem at snapshot > /path/to/filesystem_snapshot.zfs" ? But it''s painfull to reserve pretty large amount if disk space to store intermidiate .zfs file.. >> >> Of course, I can write to remote type using ssh using the command below but I''d lile to see some kind of meaningful names on the tape: >> >> # zfs send tank/filesystem at snapshot | ssh remote_server "cat > /dev/rmt/0bn" >> >> > > close. mt(1) is the command you want rather than cat. >I sent too soon, mt(1) for managing tape files. It is also usually better to use dd as JP suggests because you can match the block size, which is needed for efficiency in some cases. -- richard> -- richard > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >