disk image

June 6, 2008

Dear lazy web.

I am going to install a new system (Debian and some embedded timesys Linux) and I would like to back it up in a smart, quick way.  Ideally, I would like to do a disk image or something like that.  A network backup (rsync) wouldn’t be bad but I’m looking for a fast, easy and reliable way of backing up.  I would be willing to sacrifice fast, but it needs to be easy and reliable…anyways, whats the best bet?



  1. Partimage has done the trick for me for quite some time.

  2. If you want a whole disk image, dd. If you want a whole image but a somewhat less confusing interface, partimage. If you want file backups into an archive, tar. If you want file backups into the same sort of directory structure, rsync. If you want file backups with history (“what was in that directory two weeks ago?”), rdiff-backup.

    I use rdiff-backup on /home and a few config directories (/etc, etc.) with occasional tar backups of everything. rdiff-backup is lovely utility.

  3. This is what I did when I needed to backup a disk over the network and couldn’t get any kind of file-sharing working.

    I decided to keep it simple. Establish a raw TCP connection between computers using nc, and send over the connection the disk partition using dd.

    On the destination computer, start listening on some port and save what you receive to a file:
    nc -l -p 2834 > backup.img

    On the source computer, dump the contents of the disk partition in question and send it to the destination computer on said port:
    dd if=/dev/sda1 | nc 2834

    Where 2834 is the port that will be used, is the IP of the destination computer, backup.img is the filename of the disk image to save and /dev/sda1 is the disk partition to backup on the source computer.

    This worked a treat, and I could mount the disk image using:
    mount -o loop backup.img /your/mount/point

    Just make sure the partition isn’t mounted as you dump it, or else the backup will be corrupt!

    Also note that the file will be the exact size of the disk partition it was sourced from, regardless of how of the partition was actually used.

  4. I’ve always used Clonezilla because I find it the most easiest, self-explanatory solution available. I can restore a default ubuntu image in less than 5 minutes!

    I use the clonezilla-sysresccd [google] combo personally…

  5. Youlight also want to consider rsnapshot, which is similar to rdiff-backup, but which works with a system of hard-links instead of diffs. The upside is that you can access all backups directly through the file system.

  6. well i tend to use unison to backup everything over nfs at home and work…


    there’s a unison-gtk pkg available on the repos… you can use that to get used to unison… atm i have few scripts to sync my lappy (when it used to work) and my server…

  7. Just an obervation. Why don’t you fix the links in your blogs on planet.ubuntu.com? If someone wants to read your whole writeup and clcik either on the title or the timestamp, we are led back to planet.ubuntu.com.

  8. I used tar for exactly this purpose (backing up whole working system, cloning it to another PC).
    It’s the fastest way, esp. if you using fast storage (i.e. external usb-drive) – you don’t even should use compression.

    Restoring this is as easy as booting from livecd/usb, and untarring archive to the root of clean filesystem.

    IMO dd is overkill here. With tar you can change underlying filesystem, disk layout, etc.

  9. Why are you only using your blog to ask for help?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: