Re: Backing up directories RH 7.3

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: plug-discuss
Subject: Re: Backing up directories RH 7.3
On Mon, 27 Sep 2004, todd hewett wrote:

> I am trying to back up an entire directory, I would like to preserve owners
> groups and permissions.
>
> So lets say I am trying to back up a dir /root/myscripts/
>
> There are sub-directories also.


The standard Unix way is to use tar. The tar command historically was for
creating tape archives but is now commonly used for creating archive
files.

tar cf myscripts.tar /root/myscripts

c is for create
f is to select the filename to create (myscripts.tar)

You could use "cvf" to be verbose and list the filenames as added to
archive.

And use "cvzf myscripts.tar.gz" to compress it (using gzip format).

Then later you can extract it somewhere else with:

tar xvzf myscripts.tar.gz

As another email mentioned rsync, there are numerous ways it can be done.
I normally use tar or cpio (even for remote transferring) or rsync.


Jeremy C. Reed

                 BSD News, BSD tutorials, BSD links
                http://www.bsdnewsletter.com/


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss