Found the answer that does NOT require logging in with root (even with rsa keys).
This is it:
First, you have to add rsync to the sudoers file. This must be done on the side where the files are owned by root that was blocked from transfering.
So run
Then add this line
Code:
username ALL=NOPASSWD:/usr/bin/rsync
Save that and now rsync can be run on the server as the 'user' but that user now has sudo ability for rsync.
Now, add the following switch to the rsync command.
Code:
--rsync-path='sudo rsync'
This tells rsync to run with sudo, allowing it to access the root files. And you don't need a password, because you added rsync to the sudoers file.
Plus, no root login and/or keys for root, which is ideal.
I'm going to mark this as solved, but if someone see's a problem with this, let me know.
Bookmarks