0

I'm moving from one VPS to another, and I figured that the simplest way to transfer data would be rsync.

However, the data is owned by a user, www-data, which doesn't have ssh privileges, and I'd like it to be owned by the same (named) user on the target machine. Obviously I need all file permissions preserved. I have SSH access via another user with sudo privileges on both machines.

Is this possible to do this with rsync?

Leonid Shevtsov
  • 551
  • 1
  • 5
  • 8

1 Answers1

3

why not rsync and chown afterwards? alternatively you can temporarily allow root logins to one of the machiens and run rsync.. if run as root - it'll preserve ownership.

pQd
  • 29,981
  • 6
  • 66
  • 109
  • 1
    as a side note, you can do `PermitRootLogin without-password` to enforce a key login, and then `AllowUsers root@ip.add.re.ss` to restrict /which/ hosts you will allow root to login from. – cpbills Jun 06 '10 at 14:05