On Thu, May 16, 2002 at 11:17:46AM +0800, Maynard B. Fernando wrote:

> to compress: tar -zcvf name_of_the_file.tar.gz *
> to uncompress: tar -zxvf name_of_the_file.tar.gz

I suggest you add the 'p' switch as well, to preserve permissions and
ownerships. That is, after all, the problem Jim is trying to solve.

tar -zcvpf /path/to/name_of_the_file.tar.gz /var/www  (to compress and archive)
tar -zxvpf /path/to/name_of_the_file.tar.gz    (to restore from the archive)

> ----- Original Message ----- 
> From: "Jim Hale" <[EMAIL PROTECTED]>
> To: "Mailing List - Red Hat (Co)" <[EMAIL PROTECTED]>
> Sent: Thursday, May 16, 2002 11:11 AM
> Subject: Archiving Folders
> 
> 
> > How would I compress/archive a set of folders into one file?
> > 
> > I mean, what I'd like to do is archive the COMPLETE contents of my
> > /var/www folder (including all folders, subfolders, users/groups,
> > read/write access etc) so that I can copy the file to another machine
> > for backing up to tape with my other stuff.
> > 
> > I have been using Samba to map to the folder, but when I copy stuff over
> > to my Win2K backup machine, if something crashes on the Linux box and I
> > have to copy stuff back, I'm having to reset user/groups and their
> > permissions to the folders and files.
> > 
> > I want a file that I can copy back to the Linux box, un-archive (with
> > paths) so that everything is back to normal in a minimum amount of time.

-- 
Anand Buddhdev
Personal site: http://anand.org



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to