Hi all, I''ve recently started down to put on production use for zfs and I''m looking to how doing a backup of filesystem. I''ve more than one server to migrate to ZFS and not so more server where there is a tape backup. So I''ve put a L280 tape drive on one server and use it from remote connection. The ZFS configuration and command to make a backup is the following: --- Client A Client-A# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 119G 50.0G 69.0G 42% ONLINE - Client-A# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 37.4G 50.2G 36.7K /tank tank/zones 37.2G 50.2G 25.6G /opt/zones tank/zones at 2008.10.28 11.6G - 25.0G - Client-A# zfs send tank/zones at 2008.10.28 | /opt/3pp/openssh/bin/ssh -c blowfish -l root server-backup <10.1.101.30> \(dd ibs=258048 of=/dev/rmt/1 obs=2064384 \) When I want to restore what I''ve dumped, I do the following: Client-B# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 144K 66.9G 27.5K /tank tank/backup 24.5K 66.9G 24.5K /tank/backup tank/zones 24.5K 66.9G 24.5K /tank/zones Client-B# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT tank 68G 148K 68.0G 0% ONLINE - Client-B# /opt/3pp/openssh/bin/ssh -c blowfish -l root server-backup \(dd if=/dev/rmt/1 bs=2064384 \) | zfs receive tank/zones stty: : Invalid argument cannot receive: invalid stream (bad magic number) select: Bad file number Client-B# What the trick? Thanks Cesare -- Groucho Marx - "All people are born alike - except Republicans and Democrats." -------------- next part -------------- An HTML attachment was scrubbed... URL: <mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081102/884f201f/attachment.html>
Cesare wrote:> Hi all, > > I''ve recently started down to put on production use for zfs and I''m > looking to how doing a backup of filesystem. I''ve more than one server > to migrate to ZFS and not so more server where there is a tape backup. > So I''ve put a L280 tape drive on one server and use it from remote > connection. > > The ZFS configuration and command to make a backup is the following: > > --- Client A > > Client-A# zpool list > NAME SIZE USED AVAIL CAP HEALTH ALTROOT > tank 119G 50.0G 69.0G 42% ONLINE - > Client-A# zfs list > NAME USED AVAIL REFER MOUNTPOINT > tank 37.4G 50.2G 36.7K /tank > tank/zones 37.2G 50.2G 25.6G /opt/zones > tank/zones at 2008.10.28 11.6G - 25.0G - > Client-A# zfs send tank/zones at 2008.10.28 | /opt/3pp/openssh/bin/ssh -c > blowfish -l root server-backup \(dd ibs=258048 of=/dev/rmt/1 > obs=2064384 \) > > When I want to restore what I''ve dumped, I do the following: > > Client-B# zfs list > NAME USED AVAIL REFER MOUNTPOINT > tank 144K 66.9G 27.5K /tank > tank/backup 24.5K 66.9G 24.5K /tank/backup > tank/zones 24.5K 66.9G 24.5K /tank/zones > Client-B# zpool list > NAME SIZE USED AVAIL CAP HEALTH ALTROOT > tank 68G 148K 68.0G 0% ONLINE - > Client-B# /opt/3pp/openssh/bin/ssh -c blowfish -l root server-backup > \(dd if=/dev/rmt/1 bs=2064384 \) | zfs receive tank/zones > stty: : Invalid argument^^^^^ You must fix your shell environment first. Try something simple, like "ssh ... server-backup ls" and see what is returned. -- richard> cannot receive: invalid stream (bad magic number) > select: Bad file number > Client-B# > > What the trick? > > Thanks > Cesare > -- > > Groucho Marx - "All people are born alike - except Republicans and > Democrats." > ------------------------------------------------------------------------ > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > mail.opensolaris.org/mailman/listinfo/zfs-discuss >
On Mon, Nov 3, 2008 at 6:17 AM, Richard Elling <Richard.Elling at sun.com>wrote:> Cesare wrote: > >> Hi all, >> >> I''ve recently started down to put on production use for zfs and I''m >> looking to how doing a backup of filesystem. I''ve more than one server to >> migrate to ZFS and not so more server where there is a tape backup. So I''ve >> put a L280 tape drive on one server and use it from remote connection. >> >> The ZFS configuration and command to make a backup is the following: >> >> --- Client A >> >> Client-A# zpool list >> NAME SIZE USED AVAIL CAP HEALTH ALTROOT >> tank 119G 50.0G 69.0G 42% ONLINE - >> Client-A# zfs list >> NAME USED AVAIL REFER MOUNTPOINT >> tank 37.4G 50.2G 36.7K /tank >> tank/zones 37.2G 50.2G 25.6G /opt/zones >> tank/zones at 2008.10.28 11.6G - 25.0G - >> Client-A# zfs send tank/zones at 2008.10.28 | /opt/3pp/openssh/bin/ssh -c >> blowfish -l root server-backup \(dd ibs=258048 of=/dev/rmt/1 obs=2064384 \) >> >> When I want to restore what I''ve dumped, I do the following: >> >> Client-B# zfs list >> NAME USED AVAIL REFER MOUNTPOINT >> tank 144K 66.9G 27.5K /tank >> tank/backup 24.5K 66.9G 24.5K /tank/backup >> tank/zones 24.5K 66.9G 24.5K /tank/zones >> Client-B# zpool list >> NAME SIZE USED AVAIL CAP HEALTH ALTROOT >> tank 68G 148K 68.0G 0% ONLINE - >> Client-B# /opt/3pp/openssh/bin/ssh -c blowfish -l root server-backup \(dd >> if=/dev/rmt/1 bs=2064384 \) | zfs receive tank/zones >> stty: : Invalid argument >> > > ^^^^^ > You must fix your shell environment first. Try something > simple, like "ssh ... server-backup ls" and see what is returned.I tried to fixed up inserting the "-qt" flags on SSH command. The "stty" error disappear but the result did not change. I noticed that environment sourcing configuration file on server-backup host and print some information on stdout screen. Those characters invalidate the input streaming on zfs. Here the printshoot: -- Client-B# /opt/3pp/openssh/bin/ssh -qt -c blowfish -l root server-backup \(dd bs=2064384 if=/dev/rmt/1 \) | zfs receive -v tank/zones receiving full stream of tank/zones at 2008.10.28 into tank/zones at 2008.10.28 -- Thanks a lot for let me on right direction. Cesare> -- richard > > cannot receive: invalid stream (bad magic number) >> select: Bad file number >> Client-B# >> >> What the trick? >> >> Thanks >> Cesare >> -- >> >> Groucho Marx - "All people are born alike - except Republicans and >> Democrats." >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> mail.opensolaris.org/mailman/listinfo/zfs-discuss >> >> > >-- Jack Benny - "Give me golf clubs, fresh air and a beautiful partner, and you can keep the clubs and the fr... -------------- next part -------------- An HTML attachment was scrubbed... URL: <mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081103/20d287f5/attachment.html>