Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to rsync some directories from a webserver running RHEL5 to a system running Xubuntu. I have rsync, ssh, and keys setup for the machines. I've tried everything so that when i backup from the source, the destination maintains the user and group names,etc.

Source:

drwx--x--x  8 root     root     4096 Feb  8 03:29 ./
drwxr-xr-x 29 root     root     4096 Feb  6 14:46 ../
drwxr-xr-x  5 root     root     4096 Dec 19 14:58 .cpan/
drwxr-xr-x  3 root     root     4096 Feb  8 03:29 .cpanm/
drwx------  6 root     root     4096 Feb  7 03:29 .cpcpan/
drwx------  4 root     root     4096 Aug 16  2010 cpeasyapache/
drwx--x--x 35 foreve24 foreve24 4096 Feb  6 11:33 foreve24/
drwx------  2 root     root     4096 Mar  8  2011 MySQL-install/

Destination:

drwx--x--x 8 root    root    4096 Feb  8 03:29 .
drwxr-xr-x 7 sbackup sbackup 4096 Feb  8 12:25 ..
drwxr-xr-x 5 root    root    4096 Feb  8 12:25 .cpan
drwxr-xr-x 3 root    root    4096 Feb  8 12:25 .cpanm
drwx------ 6 root    root    4096 Feb  8 12:25 .cpcpan
drwx------ 4 root    root    4096 Feb  8 12:25 cpeasyapache
drwx------ 2 root    root    4096 Feb  8 12:25 foreve24
drwx------ 2 root    root    4096 Mar  8  2011 MySQL-install

As you can see everything is kept as root. Here's my insane rsync command i'm using:

sudo /usr/bin/rsync --rsync-path="sudo /usr/bin/rsync" -azvrpogRHAX --fake-super --numeric-ids --rsh='ssh -l root -p 14308' --files-from=/home/foreve24/backup_files/movelist / rsync://root@xxx.xxx.xxx.xxx:/sitebackup/

I started with:

rsync -azvrR --rsh='sudo ssh -p 14308' --files-from=/home/foreve24/backup_files/movelist / rsync://sbackup@xxx.xxx.xxx.xxx/sitebackup

This has about every suggestion i've seen but I still can't get 'foreve24' as user and group for example.

The xubuntu server is using rsyncd i believe; is there configuration or do i have to disable to that in order to properly copy permissions?

Is /etc/passwd containing the same users the only way? if so, how do i properly deal with already assigned and conflicting UID and GID in the passwd files?

I have a file/script method to re-replicate the permissions but my understanding is I can get rsync to preserve them somehow in this instance.

Any help would be greatly appreciated!

share|improve this question
1  
First, an easy question: Does foreve24:foreve24 exist on the destination system? –  Ignacio Vazquez-Abrams Feb 8 '13 at 19:44
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.