SUMMARY: archiving a directory to remote tape

From: Ho-Sung Song (
Date: Tue Sep 09 1997 - 04:56:51 CDT

Fellow Sun Managers,

Thanks for your prompt and plenty of responses.

My original question was:

Two Solaris machines(sun_a, sun_b), and I intend to archive a directory in
sun_a into a tape drive in sun_b as follows.

sun_b# tar cvfb - 20 ./dir | rsh sun_a exec dd of=/dev/rmt/0 obs=20b

And above archiving doesn't fail, but the following extraction fails.

sun_a# tar tvf /dev/rmt/0 tar: tape read error sun_a# ---

Answer: Don't use 'exec'. i.e. just 'tar .. | rsh sun_a dd ..' works.

I don't know what the difference is, but I can successfully 'tar tvf /dev/rmt/0' and 'tar xvf /dev/rmt/0' in sun_a by omitting 'exec' in 'rsh sun_a exec dd ...' when archiving. I always feel it's not good to 'rsh sun_a dd ...'(without 'exec') because it produces two processes in sun_a machine(a csh process and real dd process), but from this lesson, I found it's important not to use 'exec' in the command combination piped to rsh. Could someone please explain the reason for this tricky phenomenon ?

Thanks to:

Vipin Gupta <> David Thorburn-Gundlach <> Alejandro Lopez-Valencia <> Mark Heath <> "Raymond F. Rodebaugh" <> "martha.crocker" <> (Syed Zaeem Hosain) (System Administrator) (Kris Briscoe) Joel Lee <> Michael Hill <> Glenn Satchell - Uniq Professional Services <>

Some managers suggested to do 'dd if=/dev/rmt/0 | tar tvf -' in sun_a because one cannot use tar to read a dd archive. It also works with the archive I made with 'tar ... | rsh exec dd of...'. But the statement that one can't use tar to read a dd archive seems false, 'cause I can use tar to extract a dd archive without 'exec' in rsh command.

Best regards, Ho-Sung Song

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:02 CDT