LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync command (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-command-825247/)

windstory 08-10-2010 01:33 AM

rsync command
 
I' using "rsync -a /opt/* /backup/opt".

I have a question for this command.

1. permission.
2. ownership.

When I restore data from this backup, can I have no prblem for permission and ownership?

linuxlover.chaitanya 08-10-2010 01:38 AM

-p options preserves the permissions. -a seems to be a combination of several and -p is included. So it should preserve the permissions.

pwc101 08-10-2010 01:44 AM

The -a is a synonym for -rlptgoD. The p in those options makes rsync preserve permissions, whilst the o makes it preserve ownership. Assuming the filesystem in /backup/opt supports permissions and ownership of files, then when you restore from backup, all the files should have the same ownership as they originally did, so long as you copy using something which transfers permissions as well as data (cp -a, for example).


All times are GMT -5. The time now is 11:30 PM.