cancel
Showing results for 
Search instead for 
Did you mean: 

tar

Ragni Singh
Super Advisor

tar

Hi all, how would I tar up everything in / on one system and then untar it to a tape on another system. Is this possible. Any help will be greatly appreciated and points will be assigned.
3 REPLIES
Vincent Fleming
Honored Contributor

Re: tar

What do you mean, untar it to a tape?

If what you mean is how to tar up a filesystem and write the tar to a tape on another system, then there are several ways.

One way that used to work that was easy was to NFS export the /dev filesystem of the machine with the tape drive, and mount it on the client machine - then just tar as if the tape drive is local.

Another way we used to do that was via remote shells:

tar cvf - | rsh remoteserver cat > /dev/rmt/0n


Good luck!

Vince
No matter where you go, there you are.
Ragni Singh
Super Advisor

Re: tar

Thanks for yur help but when I try running it with the tar command, it gives me a messge os sort " refusing to create an empty archive".

Any other ideas.
Stuart Browne
Honored Contributor

Re: tar

Vincent missed a character:

tar cvf - . | rsh remoteserver cat > /dev/nst0

(Note: I chagned the device name to a Linux device node for a tape, and put a period before the pipe).

Otherwise, if you really *WANT* to create a file first, you can 'dd' a tar file directly to a tape device as well.

It's basically the same as what was done above, but using an intermediate file instead of immediately.

I would advise against using an intermediate file if possible.
One long-haired git at your service...