On Wed, Sep 25, 2002 at 09:38:55PM +1000, Gordon Cormack wrote: > > I'm trying to dump from an Amanda tape onto the hard-drive by not using > Amanda. This is probably a "you don't know how to use tar properly" question > but: > > #mt -f /dev/rmt/0n status > Vendor 'SONY ' Product 'SDX-300C ' tape drive: > sense key(0x6)= Unit Attention residual= 0 retries= 0 > file no= 0 block no= 0 > > #mt -f /dev/rmt/0n rewind > > I'm obviously doing something wrong here cause the command: > #dd if=/dev/rmt/0n bs=32k skip=1 | /usr/local/bin/tar -cv -f > /export/output.tar > /usr/local/bin/tar: Cowardly refusing to create an empty archive
You're mixing your metaphors, I'm afraid. Either of the following should work 1) dd if=/dev/rmt/0n bs=32k skip=1 of=/export/output.tar This will create the tar file for you (hopefully you haven't compressed the tar file on tape - if you have, change to of=/export/output.tar.gz) and then you can use tar [tx]f (or [tx]zf if compressed) to list|extract the contents. 2) dd if=/dev/rmt/0n bs=32k skip=1 | tar xf - This will extract the tar file under the current directory for you. Use tar xzf if it was compressed, or tar tf (or tzf if compressed) if you just want to view the contents of the backup file. The command line you gave was a bit of a mix of both of the above and it was simply wrong. Kindest regards, Niall O Broin