Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Complete exact copy!

share|improve this question
I believe this is a duplicate of:… – Nathan Adams Dec 7 '09 at 0:22
up vote 10 down vote accepted

If you are wanting exact same partition layout then:

Open Source


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.

share|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

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.

share|improve this answer

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.

share|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

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

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

G4U (Ghost for Unix), NetBSD based live CD

G4U: Harddisk Image Cloning for PCs

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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