[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Backup across LAN using tar



TAR uses:

tar cvf ../filename .

to create a file archive of the current directory, or

tar czvf ../filename .

to create a compressed (gunzip) tarball. You can use tar to copy an entire
filesystem by using:

cd sourcedir ; tar cvf - . | ( cd destdir ; tar xvf - )

To copy from a remote system, rsh is used:

cd destdir ; rsh remotesystem "cd sourcedir ; tar cvf - . " | tar xvf -

NOTE:  the -v switch is for verbose mode. Remove it from one tar command so
you don't see filenames twice each.  The systems must be trusted peers for
this to work. This could be a security risk. It's also possible to use tar
to write to a tape device on a remote system (peer relationship required):

cd sourcedir ; tar cvf - . | rsh remotesystem dd of=/dev/rmt0 obs=20

The ouput blocksize of 20 is the default for tar on Linux. Here's an example
of the same principle using dd (on the source machine):

dd if=/dev/cdrom | rsh DestBox dd of=/destpath/filename.iso

which creates an iso image file. In this example, the cdrom wasn't mounted
and doesn't need to be.

I hope this helps. I've made it all work on various platforms.

--
Karl L. Pearson
Senior Consulting Systems Analyst
Senior Consulting Database Analyst
karlp ourldsfamily com
 My Thoughts on Terrorism In America:
 http://www.ourldsfamily.com/wtc.shtml

On Tue, 6 Nov 2001, Jeff CTR Vandenbussche wrote:

     I know this is slightly off topic.  Is there any way to use tar to
     backup another system on a network.  I want to use tar (or any other
     method) to backup my Linux boxes (that have no means of backup) onto
     the 8mm tape drive on my RS/6000.  Does anyone know of a way to do
     this.

     Thanks,

     Jeff



_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]