I'm just trying to copy a directory from one home server to another, both running Ubuntu (9.04 and 9.10), using rsync. The trouble I'm having is that some of the files in the directory (and subdirectories) are owned by root. The main administrator account on both machines is 'ben', so running this on the old server:
rsync -v -u -a -p -t -rsh=ssh --stats --progress source/ ben@newserver:/dest
Prompts me for ben@newserver's password, copies source/ but all the permissions are 'ben' at the new destination. Running this using sudo means I have access to root's files, but on the other end ben can't write them as belonging to root. Sending to root@newserver asks for root's password, which Ubuntu doesn't give you.
Can anyone explain simply how to do this? Thanks :)