PDA

View Full Version : Linux - Moving /home to new /home



personthingy
05-03-2006, 01:23 PM
O fun.. O joy..
Falptops dead, and i got a new toy :D

Ive set up a new system, and i would now like to start moving much of the stuff from /home to a new drive that will be the new /home partition. Obviously this involves keeping the ownership of files unchanged

If i log in as root and simply move files from A to B all the moved files change ownership to root, so how do i do this and retain user ownership?

Idealy i'd like to do this using a live CD, such as Mepis as this is what i'm most familiar with.

Mike
05-03-2006, 01:36 PM
so how do i do this and retain user ownership? Can't you do a chown after you've moved them? Or are there multiple owners?

Mike.

Graham L
05-03-2006, 01:38 PM
man cp. :D There is an option to keep all permissions and ownerships.

There's a better way which uses tar to make an archive, compress it on the fly, and pipe it to another instance of tar which unpacks it all on the destination. Google will find a howtodoit. "moving /home tar" looks pretty good.

Chilling_Silence
05-03-2006, 02:20 PM
IIRC its cp -Rvp

:)