[ale] backup

Mike Kachline kachline at medept17.coon.gatech.edu
Mon Jun 21 13:31:39 EDT 1999


On Mon, 21 Jun 1999, Marc Vogt wrote:

> 
> I have two 18 Gig drives and I would like to temporarily use 
> one of them as a backup of the other, so that it is an exact copy
> not just all the stuff in .tar files.  One drive is mounted as 
> /home/group and the other as /home/group2.

> 
> I thought of just simply:
> 
> cp -R /home/group /home/group2/
<snip>
	Hmm. cp -aR /home/group /home/group2 would seem more appropriate
to me. Using "-a" keeps all of the permissions, ownership and such other
attributes.


>    cd fromdir ; tar cf - . | ( cd todir ; tar xf -i )
<snip>
	Personally, I dislike this way of using tar too. Basically all
they are doing here is using the stdio file descriptors which can be
explicitly referenced anyhow. Thus...

	$cd fromdir ; tar -cf /dev/stdout . | (cd todir ; tar -xf
/dev/stdin)


	All this says is, starting from "fromdir" have tar run and
"create" it's tar file to the "stdout" file descriptor. then,
simultaniously, cd to "todir" and have a different tar process read the
"stdin" file descriptor and expand back out to actual files.


>    cd /home/group ; tar cf - . | ( cd /home/group ; tar xf -i )
> 
> also I am not unfamiliar with tar and this makes no sense to me.
> tar -cf .   ????????????
<snip>
	tar -cf .
	tar: "tar program"
	-c: "Create" a tar file.
	-cf: Tar into the file specified (ie -cf foo.tar would create a
file called "foo.tar" in the local directory. "-cf /tmp/foo.tar" would
create a file called "foo.tar" in the /tmp directory, and so on).
	.: Tar should base the root of your .tar file out of the current
directory (ie "." just indicates the directory you are currently in).



						Cheers,
							- Mike
====================================================================
Michael Kachline CS, Georgia Institute of Technlology
kachline at brightstar.gt.ed.net
http://brightstar.gt.ed.net/kachline
====================================================================






More information about the Ale mailing list