* Change the mount points of the newly cloned partitions in /etc/fstab accordingly

* Change the mount points of the newly cloned partitions in /etc/fstab accordingly

* Finally, install the GRUB bootloader if necessary. (See [[GRUB]])

* Finally, install the GRUB bootloader if necessary. (See [[GRUB]])

Line 80:

Line 81:

==Disk cloning software==

==Disk cloning software==

===Disk cloning in Arch===

===Disk cloning in Arch===

−

The ncurses program [http://en.wikipedia.org/wiki/Partimage PartImage] is in the community repos. The interface is not exceptionally intuitive but it works. There are currently no GTK/QT based disk cloners for Linux. Another option is to use dd, a small CLI image/file creation utility. The wikipedia has a list of various version of dd, specifically oriented to this purpose [http://en.wikipedia.org/wiki/Dd_(Unix)#Recovery-oriented_variants_of_dd]. [http://www.garloff.de/kurt/linux/ddrescue/ dd_rescue] works efficiently with corrupt disks copying error free areas first and later retrying error areas.

+

The ncurses program [[wikipedia:Partimage|PartImage]] is in the community repos. The interface is not exceptionally intuitive but it works. There are currently no GTK/QT based disk cloners for Linux. Another option is to use dd, a small CLI image/file creation utility. The wikipedia has a list of various version of dd, specifically oriented to this purpose [[wikipedia:Dd_(Unix)#Recovery-oriented_variants_of_dd]]. [http://www.garloff.de/kurt/linux/ddrescue/ dd_rescue] works efficiently with corrupt disks copying error free areas first and later retrying error areas.

===Disk cloning outside of Arch===

===Disk cloning outside of Arch===

Line 87:

Line 88:

* [http://partedmagic.com/doku.php?id=start PartedMagic] has a very nice live cd/usb with PartImage and other recovery tools.

* [http://partedmagic.com/doku.php?id=start PartedMagic] has a very nice live cd/usb with PartImage and other recovery tools.

* [http://www.mondorescue.org/ Mindi] is a linux distribution specifically for disk clone backup. It comes with its own cloning program, Mondo Rescue.

* [http://www.mondorescue.org/ Mindi] is a linux distribution specifically for disk clone backup. It comes with its own cloning program, Mondo Rescue.

−

* [http://en.wikipedia.org/wiki/Acronis_True_Image Acronis True Image] is a commercial disk cloner for Windows. It allows you to create a live cd (from within Windows), so you do not need a working Windows install on the actual machine to use it.

+

* [[wikipedia:Acronis_True_Image|Acronis True Image]] is a commercial disk cloner for Windows. It allows you to create a live cd (from within Windows), so you do not need a working Windows install on the actual machine to use it.

* [http://www.fsarchiver.org/Main_Page FSArchiver] allows you to save the contents of a file system to a compressed archive file. Can be found on the [http://www.sysresccd.org/Main_Page System Rescue CD].

* [http://www.fsarchiver.org/Main_Page FSArchiver] allows you to save the contents of a file system to a compressed archive file. Can be found on the [http://www.sysresccd.org/Main_Page System Rescue CD].

* [http://clonezilla.org/ Clonezilla] is an enhanced partition imager which can also restore entire disks as well as partitions.

* [http://clonezilla.org/ Clonezilla] is an enhanced partition imager which can also restore entire disks as well as partitions.

+

* [http://redobackup.org/ Redo Backup and Recovery ] is a Live CD featuring a graphical front-end to partclone.

Using dd

The dd command is a simple, yet versatile and powerful tool. It can be used to copy from source to destination, block-by-block, regardless of their filesystem types or operating systems. A convenient method is to use dd from a live environment, as in a livecd.

Warning: As with any command of this type, you should be very cautious when using it; it can destroy data. Remember the order of input file (if=) and output file (of=) and do not reverse them! Always ensure that the destination drive or partition (of=) is of equal or greater size than the source (if=).

5. Save extra information about the drive geometry necessary in order to interpret the partition table stored within the image. The most important of which is the cylinder size.

# fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info

NOTE: You may wish to use a block size (bs=) that is equal to the amount of cache on the HD you are backing up. For example, bs=8192K works for an 8MB cache. The 64K mentioned in this article is better than the default bs=512 bytes, but it will run faster with a larger bs=.

Restore system

To restore your system:

# gunzip -c /mnt/sda1/hda.img.gz | dd of=/dev/hda

Using cp

The cp program can be used to clone a disk, one partition at a time. An advantage to using cp is that the filesystem type of the destination partition(s) may be the same or different than the source. For safety, perform the process from a live environment.

The basic procedure from a live environment will be:

Create the new destination partition(s) using fdisk, cfdisk or other tools available in the live environment.

Disk cloning software

Disk cloning in Arch

The ncurses program PartImage is in the community repos. The interface is not exceptionally intuitive but it works. There are currently no GTK/QT based disk cloners for Linux. Another option is to use dd, a small CLI image/file creation utility. The wikipedia has a list of various version of dd, specifically oriented to this purpose wikipedia:Dd_(Unix)#Recovery-oriented_variants_of_dd. dd_rescue works efficiently with corrupt disks copying error free areas first and later retrying error areas.

Disk cloning outside of Arch

If you wish to backup or propagate your Arch install root, you are probably better off booting into something else and clone the partition from there. Some suggestions:

PartedMagic has a very nice live cd/usb with PartImage and other recovery tools.

Mindi is a linux distribution specifically for disk clone backup. It comes with its own cloning program, Mondo Rescue.

Acronis True Image is a commercial disk cloner for Windows. It allows you to create a live cd (from within Windows), so you do not need a working Windows install on the actual machine to use it.