up vote 2 down vote favorite
5
share [g+] share [fb]

Complete exact copy!

link|improve this question

I believe this is a duplicate of: serverfault.com/questions/80205/clone-a-working-linux-server/… – Nathan Adams Dec 7 '09 at 0:22
feedback

8 Answers

up vote 10 down vote accepted

If you are wanting exact same partition layout then:

Open Source

Commercial

Or if you just want the data then cpio or tar can achieve those results too

NOTE: Most of these require physical access. If this is to be done via a hosted solution then you may look at the dd/netcat option and you could substitute dd with cpio or tar.

link|improve this answer
+1 For Clonezilla. I've been deploying Ubuntu business networks (desktop and server) with it for a while now. Set up one workstation to have just what you need, configure ldap/pam .. and viola :) – Tim Post Oct 19 '09 at 7:41
Acronis works on strange softraid controllers where most rescue distros fail. +1 for Acronis... Worth every cent IMHO. – Icapan Oct 19 '09 at 12:29
feedback

Take into account that hardware differences might make the copy system unbootable.

Although Linux is more flexible, there might be a situation where the system wont boot.

link|improve this answer
feedback

To create image

cat /dev/sda | gzip -c > sda.image.gz

To write imageback

sudo sh -c “gunzip -c sda.image.gz | cat > /dev/sda”

Note that /dev/sda is just a generic drive, use "fdisk -l" to find what your drives identifier really is.

link|improve this answer
You might want to put that the $CWD is NOT on sda, otherwise you may have a bit of an issue here! – Wayne Oct 19 '09 at 7:24
Can you perform this on a live system (output of course to /dev/sdb)? – blank3 Oct 19 '09 at 7:39
blank3, yes you can, the drive being imaged just should not be mounted at the time. – Recursion Oct 19 '09 at 14:42
feedback

If you don't want to backup partition schema, but data, rdiff-backup is a great tool.

link|improve this answer
feedback

Mondo Rescue doesn't require physical access. Once saved me from travelling 700km! I just created and downloaded the image, copied it onto a HDD and sent it via mail. Someone just loaded the disk onto slave server and it worked.

link|improve this answer
feedback

The "dd" command will clone a partition to a new device.

link|improve this answer
feedback

Ok... I have to throw this in... backing up Linux via imaging is a disaster waiting to happen. What happens when your hardware dies and you need to migrate to something different - different platform, drivers, etc.? What happens when you want to build a duplicate of the machine for testing, but need to change just a few things?

It's a big pain and a lot of work, but I've been handling this issue with existing infrastructure at work, and I'd really recommend going to a combination of file-based backup and automated installation/configuration. You'll get a lot more flexibility in the long run and, though setting it up for existing hosts is a pain, it will save a lot of trouble when the image eventually needs to be installed on different hardware.

link|improve this answer
feedback

G4U (Ghost for Unix), NetBSD based live CD

G4U: Harddisk Image Cloning for PCs

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.