How can I copy a folder structure from one server to another keeping the same owner and file permissions?
How can I copy a folder structure from one server to another keeping the same owner and permissions?
-
Would you like to comment about why you down voted this question?– Stuart WoodwardApr 5, 2012 at 7:16
-
The question doesn't have any downvotes, so if somebody did downvote it they took it back pretty fast– Michael MrozekApr 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.– Stuart WoodwardApr 6, 2012 at 3:09
Add a comment
|
2 Answers
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