Trying to preserve UID and GID when backing up with rsync
Paul Slootman
paul+rsync at wurtel.net
Mon Feb 14 06:54:37 MST 2011
On Mon 14 Feb 2011, Robert Crida wrote:
> I am in early prototyping phase now and have the following rsyncd.conf file:
> max connections = 4
>
> [school10000]
> path = /backup/school/./10000
> read only = false
> use chroot = true
>
> I ran the following command (on the same machine as the server):
> rsync -az ./.viminfo fw.school10000::school10000
>
> The result on the server is:
> root at fw.school10000:/etc# ls -nal /backup/school/10000/
> total 12
> drwxrwxrwx 2 0 0 4096 2011-02-14 14:08 .
> drwxr-xr-x 3 0 0 4096 2011-02-14 11:30 ..
> -rw------- 1 65534 65534 590 2011-02-14 10:52 .viminfo
Check the manual page for rsyncd.conf; you'll see that the default uid
under which rsyncd runs for such modules is "nobody", which generally
equates to 65534.
Add a line "uid = 0" to enable the daemon to correctly set the owner and
groups.
Paul
More information about the rsync
mailing list