Trying to preserve UID and GID when backing up with rsync

Robert Crida rcrida at
Mon Feb 14 05:10:57 MST 2011

Hi all

I am trying to use rsync as part of a backup solution for a machine with multiple users. The intention is to run rsyncd on a different server with typically different user IDs. I also intend to run rsync from the client as root and essentially back up the following:


In the event of a disaster we would reprovision the machine then restore the user accounts etc with a single run of rsync by root. Ideally all the home directories and their contents would be restored back to their original UIDs and GIDs which would be fine because we would have provided the mapping by restoring the passwd and group files too.

I am in early prototyping phase now and have the following rsyncd.conf file:
max connections = 4

        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

The file has been saved as nobody:nogroup.

There appears to be a related bug ( which has been marked as a duplicate of

Could someone please confirm whether what I am trying to do is possible or whether I am bumping into the bug as noted above.

If there is a solution I would be keen to know. If it is the bug it would be great to know if it is being worked on?


Robert Crida
rcrida at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list