Subject: Re: Final question: best wasy to move /, /usr, /home, etc?

From: Bastien Nocera <[email-masked]>
Date: 18 Feb 2002 02:36:01 +0000

On Mon, 2002-02-18 at 02:17, Kevin B. Hendricks wrote:
>
> I am finally at the point I want to give up my old external scsi hard
> drives.  Unfrotunately, my current /, /usr, /home, etc all exist on scsi
> drives.
>
> I recently purchased a 60 gig hard drive (ide) and have now installed it.
>
> What is the best way to move all of the files and directories, and special
> device files, and etc from the scsi drive to new partitions on the IDE
> drives?
>
> Can I simply use a recursive "cp" with -a?  Should I use "tar"?  What
> about "parted" and its partition copies?
>
> Or is there some way I can run an linux distribution installer from within
> linux and make it install to the ide drive instead of the scsi?
>
> Or is there some way to make "rpm" nicely redirect where it installs
> things?
>
>
> In fact, with som much space, I would love to have Debian, SuSE, and
> YellowDog distribution sets so I can run and test OpenOffice.org against
> those distributions easily (shared build drives) with different
> distribution installations.
>
> This is my last step to get a working system so any hints on the best way
> to move so much data (and special device files) from one partition to
> another preserving the owner,group,word, permissions, file ownership,
> setuid root bits, etc. would be greatly appreciated.

I've done this several times, to install xfs support on live machines
(ie. on my desktop and laptop that were already full of crap junk and
other kind of files).

rsync -av --exclude /proc --exclude /home/ / /newroot/

Exclude every mount point from the rsync and do this for every
partition. Best is to do this from a separate root, or a rescue/boot
disk, in which case rsync -av /oldroot/ /newroot/ is easy enough without
having to care.

Cheers

PS: sick people will tell you to use tar with loads of pipes, or cpio,
don't listen to them ;)
--
/Bastien Nocera
http://hadess.net

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/