From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Kirkland, Mike # IHTUL" Newsgroups: gmane.os.tru64.managers Subject: Summary: how to tar to a remote tape device Date: Tue, 23 Jul 2002 09:55:18 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <4242F92CA015D5119B9600600834014241A44C@claven.cistech.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1027436306 29525 127.0.0.1 (23 Jul 2002 14:58:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2002 14:58:26 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.33 #1 (Debian)) id 17X17I-0007g4-00 for ; Tue, 23 Jul 2002 16:58:24 +0200 Original-Received: (qmail 2686 invoked by uid 5); 23 Jul 2002 14:58:32 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 2678 invoked from network); 23 Jul 2002 14:58:32 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 23 Jul 2002 14:58:32 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GZP00G62IXJ4W@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Jul 2002 10:58:32 -0400 (EDT) Original-Received: from smtp1.ndchealth.com ([206.227.220.50]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0GZP00H32IXHFQ@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 23 Jul 2002 10:58:30 -0400 (EDT) Original-Received: from claven.cistech.com (claven.cistech.com [198.200.166.25]) by smtp1.ndchealth.com (8.11.6/8.11.6) with ESMTP id g6NEwPx12609 for ; Tue, 23 Jul 2002 10:58:25 -0400 Original-Received: by claven.cistech.com with Internet Mail Service (5.5.2653.19) id ; Tue, 23 Jul 2002 09:55:27 -0500 Content-return: allowed Original-To: tru64-unix-managers@ornl.gov X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:1059 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1059 Thanks to everyone for the quick responses; Dr Thomas Blinn, Jerry = Butler, George Gallen, Kai Grunau and Oisin McGuinness. I did have an error in my original question as caught by the = responsers. Added below are their answers and my question. > Hi everyone, >=20 > How do you tar to a remote tape device? >=20 > I have a directory /data5/p/tmp on a local box, catdog. This = directory > contains about 24 gigs of files (8 files from 1-4 gigs in size). I = want to > tar this to another server's tape drive; doggie:/dev/tape/tape0_d1 >=20 > I tried the following, but it is way too slow: >=20 > catdog> rsh doggie dd of=3D/dev/tape/tape0_d1 | tar cvf - = /data5/p/tmp >=20 > Any suggestions or advice is appreciated. You have the pipe backwards: tar cvf - /data5/p/tmp | rsh doggie dd of=3D/dev/tape/tape0_d1 To make it faster, you need to block the tar output and block the=20 writes to the tape: tar -b32 -cvf /data5/p/tmp | rsh doggie dd of=3D/dev/tape/tape0_d1 bs=3D64k=20 for instance, although you also need to experiment with reading it back from the remote system. You will do reasonably well even if you don't block the tar output,=20 but do block the tape writes. The tape writes will usually be the bottleneck in such an arrangement. Tom Dr. Thomas P. Blinn + Tru64 UNIX Software + Hewlett-Packard Company Internet: tpb@zk3.dec.com, thomas.blinn@compaq.com, = thomas.blinn@hp.com 110 Spit Brook Road, MS ZKO3-2/W17 Nashua, New Hampshire 03062-2698 Technology Partnership Engineering Phone: (603) 884-0646 ACM Member: tpblinn@acm.org PC@Home: tom@felines.mv.net Worry kills more people than work because more people worry than = work. Keep your stick on the ice. -- Steve Smith ("Red Green") My favorite palindrome is: Satan, oscillate my metallic sonatas. -- Phil Agre, pagre@alpha.oac.ucla.edu Yesterday it worked / Today it is not working / UNIX is like that=20 -- apologies to Margaret Segall=20 Opinions expressed herein are my own, and do not necessarily = represent those of my employer or anyone else, living or dead, real or = imagined. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >From Jenny Butler Mike, This is not original - a coworker set it up - but this is what we = used on one system: (gtar czf - . | rsh $BACKUP_DEST_NODE dd of=3D$BACKUP_DEST_DATA_FILE) > $BACKUP_DEST_DATA_LOG 2>&1 =3D=3D=3D=3D=3D=3D=3D=3D >From George Gallen I use:=20 tar cvbf 20 - $1 $2 $3 $4 $5 $6 $7 $8 | rsh lserver1 dd of=3D/dev/st0 = obs=3D20=20 and=20 rsh -n lserver1 dd if=3D/dev/st0 ibs=3D20b | tar xvbf 20 - $1 $2 $3 $4 = $5 $6 $7 $8=20 try adding the -n switch to rsh, I believe that was where my problem = was.=20 Also, where are you starting from? are you entering this command from = doggie or catdog? It looks like you have your dd & tar reversed.=20 George=20 =3D=3D=3D=3D=3D=3D=3D=3D from Kai Grunau tar -cvf - . | rsh doggie dd of=3D/devtape/tape0_d1 bs=3D10240 =3D=3D=3D=3D=3D from Oisin McGuinness What you have written: catdog> rsh doggie dd of=3D/dev/tape/tape0_d1 | tar cvf - = /data5/p/tmp doesn't do anything; the dd on the remote host will wait forever for input (of specifies output file, so input defaults to stdin), and = the tar cvf - creates output but it doesn't go to input anywhere. Did you intend: catdog> tar cvf - /data5/p/tmp | rsh doggie dd of=3D/dev/tape/tape0_d1 ? This should have written data, but the blocking might not be optimal; tar's blocking factor is 20, whereas=A0dd's block size is 512bytes; you can improve by arranging for the blocking of dd to match that of tar = output by setting bs=3D10240. That should help. You could also consider doing a compression on the creation side, = followed by a reblocking before feeding to rsh. (However if your network is fast and your drive does hardware compression, it might not help.) catdog> tar cvf - /data5/p/tmp | compress -c - | dd bs=3D10240 | rsh = doggie "dd bs=3D10240 of=3D/dev/tape/tape0_d1" Hope this helps...