1

How can I copy a folder structure from one server to another keeping the same owner and file permissions?

3
  • Would you like to comment about why you down voted this question? Apr 5, 2012 at 7:16
  • The question doesn't have any downvotes, so if somebody did downvote it they took it back pretty fast Apr 6, 2012 at 1:43
  • I found some more answers here: superuser.com/questions/81789/… I searched for this question like crazy before posting and I now I have found it again. Apr 6, 2012 at 3:09

2 Answers 2

4

Using -a option with the rsync command you can transfer the file between server under same ownership and perm.

Synchronise between local and remote server

#rsync -avz /source [email protected]:/destination 

Synchronise between local and remote over ssh.

%rsync -avz -e ssh [email protected]:/source /destination 
3

rsync with -a will copy ownership and permissions. It will even work over ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .