View Single Post
  #5 (permalink)  
Old 14-02-2008, 08:41 PM
dklima dklima is offline
Junior Member
User
 
Join Date: Feb 2008
OS: SUSE
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dklima is on a distinguished road
Default

Quote:
Originally Posted by ricc View Post
... will it preserve all the user/group rights of a particular file. I doubt that. I think if we copy it using the user root from say /home to /newhome..... the files that are copied to /newhome will have root as the owner.
You can do that with the rsync command like this:

Code:
rsync -a --stats --progress /oldroot /newroot
It's a good idea to exclude some dirs, so your rsyn command become:

Code:
rsync -a --stats --progress --exclude=/mnt/* --exclude=/proc/* --exclude=/sys/* /oldroot /newroot
Reply With Quote