Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] backup using rsync and file permission


On Thu, Oct 19, 2000 at 12:38:24AM +0000, Ricky C wrote:
> hi All,
> 
> I have just started playing with rsync and in need of some guidance.
> 
> rsync (version 2.4.6) was installed on the "server", and version 2.4.1 on 
> the "client"
> 
> On the server side, directories are shared using path such as below

[...]

> rsync -avz Old_Server::folder_1 /backup/folder_1
> 
> Everything seems to work fine, all permission bits are kept, however the UID 
> and GID comes up as numbers. Does the 2 machines require the the same 
> /etc/passwd file, and its shadow ??

By default rsync will give the new files the same username/group as on the
source. If that username/group doesn't exist, it will give them the same
UID/GID as on the source. (Unless you use --numeric-ids, which will always
give them the same UID/GID).  Check that the users in question exist on the
destination system.

> What is the best way to manage this ??
> Also, is there any way to rsync the whole file system ?? so I don't have to 
> set 20 different paths in the rsyncd.conf.

There's a few different ways to use rsync.
The mode you're using is more normally what you'd use to run a public rsync
server (think in terms of a web server, where anyone can access the files).
This is the type of thing mirror.aarnet.edu.au provides, for example.

If you have full access between machines (either rsh or ssh), then you can
get rsync to work in more of an rcp-style mode. Just setup .rhosts/.shosts
permissions between machines (or certs, or whatever for ssh) and use
a command something like :

rsync -avz Old_Server:/folder_1 /backup/folder_1

Note that the two colons have become one, and the source path has become
a fully qualified path.  In this mode there's no need to run an rsync server
at all on the remote machine, you just need to have rsync in the path on
that machine (or use the --rsync-path option).

  Scott.