Clone Root Directory Debian

Associate
Joined
1 Aug 2003
Posts
1,053
I want to upgrade the hard drives in my Debian server and, rather than reinstalling and configuring everything, I want to just ghost/clone everything onto some new disks.

I'm going from a software MD SCSI array of 4 disks to an MD of 2 SCSI disks

The array includes the / mount point

Any suggestions for the best method?

I looked at GNU Parted but it's ext3 support isn't particularily good
 
You can clone hdds by simply using the dd command: dd if=/dev/sda of=/dev/sdb experiment with the bs (block size) parameter for faster speeds. Obvioisly run it from a live CD or another disk. Not sure if this will work with your raid setup though as ive never tried.
 
Good ol' Tar.

Code:
tar -cvjp --numeric-owner --file=blah.tbz .
# --create
# --verbose
# --bzip2
# --preserve-permissions


Code:
tar -xjp --numeric-owner --file=blah.tbz
# --extract
# --verbose
# --bzip2
# --preserve-permissions
 
i use partimage for backing up my root partition though clonezilla is a more advanced version.

http://www.clonezilla.org/
# Free (GPL) Software.
# Filesystem supported: ext2, ext3, reiserfs, xfs, jfs of GNU/Linux, and FAT, NTFS of MS Windows. Therefore you can clone GNU/Linux or MS windows. For these file systems, only used blocks in partition are saved and restored. For unsupported file system, sector-to-sector copy is done by dd in Clonezilla.
# LVM2 (LVM version 1 is not) under GNU/Linux is supported.
# Multicast is supported in Clonezilla server edition, which is suitable for massively clone. You can also remotely use it to save or restore a bunch of computers if PXE and Wake-on-LAN are supported in your clients.
# Based on Partimage, ntfsclone and dd to clone partition. However, clonezilla, containing some other programs, can save and restore not only partitions, but also a whole disk.
 
Oooh, clonezilla looks cool! But it seems that dd is the most popular/simpler option

Has anyone got any caveats, warnings or advice about moving a system of the type I suggested?

The plan for the new system has been revised somewhat to be an MD array of two Rapstors and the storage arrays that I have hooked up (4 SATAs addressed as one volume) to be replaced with similar. The only way I think I can do it is to take off the main storage array, install a new SATA card, dd the system array then reconnect the storage arrays and dd them to their new homes....

This is due to the fact that there isn't enough room inside the case to have all the old and all the new drives. Can anyone think of a reason why I couldn't remove the old SATAs then put them in a separate computer with the new storage SATAs and new SATA controller, boot from a live CD and then dd that whilst the server does its thing?

I'm a little concerned about moving from SCSI to SATA for the system drives as I have no idea how this will impact on the way the various setups will react (as the server has a variety of daemons and programs setup I need to make sure that they all continue to run after the upgrade but hunting down faults due to slight change in path name would be an absolute headache especially if I can't get it fixed by the time the office reopens!)
 
Back
Top Bottom