[K12OSN] Copying Files

Petre Scheie petre at maltzen.net
Fri Jun 23 13:00:50 UTC 2006


Les Mikesell wrote:
> On Thu, 2006-06-22 at 18:30, Mark Cockrell wrote:
>> Hello All,
>>     I have what I hope will be an easy question for the more experienced 
>> among us.  I'm setting up a new server and I want to move the /home from 
>> the old one to the new one.  What would be the best/easiest way to move 
>> all the files and folders to the new machine while preserving ownership 
>> and permissions?
> 
> If they are both on the network at once, from the old machine:
> cd /home
> rsync -essh -av . newmachine:/home
> 
The wrinkle is that since he's moving to a new machine, he probably doesn't have all the 
user IDs & PWs setup.  If you copy the /etc/passwd, /etc/group, and /etc/shadow from the 
old box to the new one, then all the home directories will keep their ownership correct. 
  Otherwise, if you create, say, bob on the new machine and it ends up with UID 517, but 
it was UID 654 on the old box, /home/bob won't be accessible by bob on the new box.

Petre




More information about the K12OSN mailing list