Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-10-2010, 02:33 AM   #1
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
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?
Old 08-10-2010, 02:38 AM   #2
Senior Member
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
-p options preserves the permissions. -a seems to be a combination of several and -p is included. So it should preserve the permissions.
Old 08-10-2010, 02:44 AM   #3
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
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).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync problem: command not found j_70 Linux - Software 17 09-23-2016 02:28 PM
replacing rm command with a rsync script :-) kdelover Programming 3 11-14-2009 11:49 AM
rsync command problems krisrae675 Linux - Newbie 17 08-01-2009 04:23 AM
Find command and rsync combine b-RAM Linux - General 21 05-29-2009 03:37 AM
Exclude function On rsync command its_joy Linux - Server 5 01-18-2008 05:25 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration