[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Tar command
- Subject: Re: [cobalt-users] Tar command
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Thu Apr 11 21:54:01 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
"Simon Pierce" <simon@xxxxxxxxxxxxxxx> wrote:
> I want to back up everything in the home/sites directory on my RaQ3 to a
Tar
> file. I know this isn't a Cobalt specific question, but please could
> somebody tell me what tar command to use to back up all the files in those
> directories while retaining all file attributes:
>
> - retaining the directory structure
> - retaining the file permissions
> - retaining the file ownership
## Create archive.
cd /home/sites
tar -cpvz -f /path_to/backup.tar.gz *
## Extract archive.
# Make sure users and owners are created first.
cd /home/sites
tar -xfpvz /path_to/backup.tar.gz
It's a good idea to test first. I find the best way is to create a
temporary directory in /home/tmp or create a parallel directory /home/sites2
and test there to make sure you're comfortable.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/