bigruno
bigruno

Reputation: 74

Is it possible to overwrite file permissions at destination with rsync?

I have 3 TB of data already copied with rsync.

My command:

rsync -avzP /home  <dest-user@dest-server-ip>:/backup/

Unfortunately the file permissions were not preserved. How can I overwrite the owners at destination, so that I don't need to copy everything again?

Upvotes: 0

Views: 1058

Answers (2)

bigruno
bigruno

Reputation: 74

If you want permissions to be preserved you must have root priviliges:

rsync -avzP /home  root@<dest-server-ip>:/backup/

Or:

sudo rsync -avzp --rsync-path "sudo rsync" /home <dest-user@dest-server-ip>:/backup/

Upvotes: 0

mahendra rathod
mahendra rathod

Reputation: 1638

There is the issue with the flag, use small -p not capital.

 -p, --perms                 preserve permissions

Upvotes: 1

Related Questions