Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

preserving ownership and permissions when restoring backup from cd

Status
Not open for further replies.

gitsnshigles

Technical User
Jun 30, 2001
9
0
0
US
Hi Everyone,

I back up my webserver's important websites and other directories and folders onto cd with xcdroast and it keeps the permisions and ownership of the directories and files ok. The problem is when i copy from the cd to another server. All the ownership of the directories and files get set to root.....even though the properties of the files and directories on the cd have the proper ownership and permissions. I am basically trying to put all my websites over to another server and keep the ownership and permissions intact.

Can anyone help?
 
Do the same accounts exist on the other server you are restoring to? How are you restoring them, with tar or cp?


ChrisP
 
yes, I copied over all the accounts (users) to the new server. I'm restoring from a cd. But when i copy the websites' directories from the cd, they dont take the proper ownership or permissions with them.
 
Hello,

As fluid11 mentioned if you tar the backups then move them to cd and drop onto new server and untar them your permissions and ownerships should stay in tact. When you mention restore them from cd do you mean untar or copy? Either way you should be using tar not copy if you wish to maintain permissions and ownerships.

Good luck..
 
You can use tar or cp with the -p option to preserve permissions.


ChrisP
 
Thanks fluid11 ...
Thats what I get for using the xwindows file browsers too much. I forgot about the cp --help command to get the switches that went along with copying. Shame on me...I been away from the command prompt too long.
cp -p -r did the trick.
I got the directories from the cd to where they needed to go and up and running great.

Thanks sarm for mentioning the tar method. I'll have to use tar once and again for backing up so I remember it's there too...lol ...and i promise i'll remember to look up the switches.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top