As always, this is an awesome list. My original question was about the proper syntax of doing a tar to remote tape drive via ssh, I thought it would be something Like: tar cpfv - /source_dir | ssh remote_host_with_tape_drive "/bin/tar xpf - /dev/rmt/3hbn" (I goofed on this example, the last tar would have to be cpf*but even that wasn't working) Overwhelmingly, it was suggested I use dd in place of the last tar, thus this is what I used: tar cpfv - /src_dir | ssh remote_host "/bin/dd of=/dev/rmt/3hbn" Replies: Fabrice Guerini fabrice@bluemartini.com provided the answer along with several other folks, & gave me the syntax for restoring any such Backups: tar cpfv - /source_dir | ssh remote_host "/bin/dd of=/dev/rmt/3hbn" Your mileage may vary; depending on your tape drive, you may need various options to 'dd', such as "bs=n" or "conv=sync". And I don't recommend to use absolute pathnames for directories in a 'tar' archive. Instead, use ./source_dir. TO RESTORE: cd /src_dir; ssh remote_host "dd if=/dev/rmt/3hbn" | tar xvfp - Other Replies: From: Tim Carlson <tim.carlson@pnl.gov> replace the second tar with a dd tar cpfv - /source_dir | ssh remote_host_with_tape_drive dd of=/dev/rmt/3hbt/3hbn" ---------------------------------------------------------------------------- From: John Tan <John.Tan@asx.com.au> If I were writing to tape, I'd do it through a combination of tar and dd, and run it from the machine with the tape drive. ssh remote_host_with_file_system tar cpfv - /source_dir | dd of=/dev/rmt/3hbn ---------------------------------------------------------------------------- From: Larye Parkins <LParkins@niaid.nih.gov> This is the simplest: tar - cpvf - /from_dir | ssh -l user remote_host dd of=/dev/rmt/3hbn tars to stdout, ssh streams to dd, which writes to tape device ---------------------------------------------------------------------------- From: "Doug Floer" <dfloer@topsoft.ca> tar cpfv - /source_dir | ssh remote_host_with_tape_drive "/bin/dd of=/dev/rmt/3hbn" You'll need to work out blocking factors for dd. The way to test is to logon the remote host and "tar tvf /dev/rmt/3hbn". ---------------------------------------------------------------------------- From: Michael Miller <Michael.Miller@oyster.com> we do ufsdumps as: /usr/sbin/ufsdump 0cf - / | \ /usr/local/bin/ssh -i my_identity user@host dd of=/dev/rmt/0n obs=48k conv=sync we use the dd to ensure that the blocking is done right onto the tape! ---------------------------------------------------------------------------- From: system administration account sysadmin@astro.su.se tar cvpf - /source_dir | ssh remotehost dd of=/dev/rmt/3hbn obs=10k (assuming the data will fit on one tape; this method doesn't easily let one change tapes half-way through). ---------------------------------------------------------------------------- From: "Christopher L. Barnard" <cbar44@tsg.cbot.com> I have a file in my tickler directory that reminds me how to do exactly that. --- 8<--- to do an remote dump without rsh, ssh remotehost /usr/local/bin/dumpcmd | dd obs=63k of=/dev/rmt/0n where /usr/local/bin/dumpcmd is an executable (eg.): /usr/sbin/ufsdump 0fcu - /dev/md/dsk/d0 /usr/sbin/ufsdump 0fcu - /dev/md/dsk/d2 /usr/sbin/ufsdump 0fcu - /dev/md/dsk/d3 /usr/sbin/ufsdump 0fcu - /dev/md/dsk/d4 ---------------------------------------------------------------------------- From: Dylan Northrup <northrup@loudcloud.com> You've got the arguments to the first tar in the wrong order. Also, you might have better luck using 'dd' on the opposite end. Try this: 'tar cpvf - /source_dir | ssh remote_host "dd of=/dev/rmt/3hbn obs=20b"' This works for me to duplicate from one host to another (with the output file changed to an actual file). ---------------------------------------------------------------------------- From: Chintu Pandya <cp-sm@clio.rad.sunysb.edu> Just incase if you have not received any suggestions.... here is one from me. tar cfb - 20 /source_dir | ssh remote_host " dd of=/dev/rmt/3hbn obs=20b" this should work. _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Thu Feb 28 13:10:28 2002
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:35 EST