Quote:
Originally Posted by ricc
... 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