Re: [SLE] Directory structure replication
Michael.James_at_csiro.au
Date: 07/25/03
- Previous message: Daniel Coll: "[SLE] Apache2 / PHP"
- In reply to: Jose J. Cintron: "[SLE] Directory structure replication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: suse-linux-e@suse.com Date: Fri, 25 Jul 2003 10:39:04 +1000
On Thu, 24 Jul 2003 11:27 pm, Jose J. Cintron wrote:
> I need to replicate the whole directory structure (including
> permissions, specially permissions) for a volume from one server to
> another.
>
> I have a volume called /data, in it there are about 500-600 directories
> and I need to replicate this whole structure (with permissions to a new
> server) What would be the easiest way to do this??? Ideas,
> suggestions? TIA!
There have been several good suggestions as to how to do this initially.
However "rsync" is a tool that will not just make the initial copy
but bring it back up to date. It is essentially a more fully featured "cp".
eg: You are moving a lot of users to a new server
and want to copy their home dirs over.
Directories, files, ownerships, permissions, the lot.
If the old server trusts the new using rsh
new-server# rsync -a old-server:/home/users/ /home/users/
Or using ssh, you don't need trust, ssh can prompt for a password
(but if it's a big copy encryption will slow it down)
new-server# rsync -ae ssh old-server:/home/users/ /home/users/
If there are a lot of files, the initial copy can take ages,
but with rsync you can do this ahead of time,
then redo it quickly (only changed files get copied)
during a brief changeover downtime.
If you want rsync to set ownerships, you will need to run it as root.
Very fully featured,
can be set to treat links however you like,
exclude certain files or dirs,
delete (or not) files missing in the source.
For more info
man rsync
or rsync --help
Note that default installs of Suse don't have it.
It's in Productivity:Network:Other, well worth having.
Enjoy,
michaelj
-- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166 -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: Daniel Coll: "[SLE] Apache2 / PHP"
- In reply to: Jose J. Cintron: "[SLE] Directory structure replication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|