[lug] Migrating an existing installation to a new hard drive
peter at fpcc.net
Tue Mar 12 19:13:12 MST 2002
On Wednesday 13 March 2002 12:14 am, Bear Giles wrote:
> > What would be the best way to move an existing Linux installation as an
> > exact copy to a new hard disk?
> The classic solution is to use 'cpio' in 'pass-through" mode. That will
> copy the files and directories while preserving the permissions.
> Or you could do real backups, restore them, then compare original
> and new disks. That way you'll know you have a set of good backups. :-)
> In either case, you'll need to run LILO (or whatever) at some point
> to set up the bootloader. That's a common oversight.
In the past I have used rsync to make a "cold mirror" of a system. Wherein a
second drive is installed in the system and rsync copied each filesystem to
its counterpart on the other disk. As mentioned, this won't be good enough
for your bootloader, so you'll need to do your initial boot from a floppy and
square that away.
In my case the /one/ file that I didn't use this for is /ect/fstab, since it
was on a separate physical interface. I had an "oh shit" disk that booted
the system to "last night."
For your situation it might be better/just as good to just use "cp -a" on
each filesystem. I used rsync because it does a binary diff on each file,
making each copy operation after the first one as fast as possible.
More information about the LUG