Welcome to the new Linux Foundation Forum!

Is there a way to create a disk image of my whole system?

Say I have my system installed and set up the way I want it, is there a way I can copy it to an image to save in case I would want to restore it later?

My HDD is using about 100 GB of space right now, if I create an image would it be the same size? Is there a way to compress it to possibly save on a disk? Or would the image always be about the same size as the actual system?

I'm using Mint 17 Cinnamon (not sure if it matters if you know the OS for this question).

Comments

  • bingrenlingbingrenling Posts: 9
    edited June 2014
    Hello,

    There is indeed.

    I have a blog post about the tool required here:
    http://elevenislouder.co/manual-backups-in-linux-dd/

    However, on any linux/unix system the command would be:
    dd if=/dev/sdX of=/mount/point/disk.img

    Now, on most systems, the main disk would be sda, so the command would be dd if=/dev/sda of=/mount/point/disk.img

    Assuming that you only have one internal hard disk and you want the image to be backed up to an external hard disk and it was auto detected and mount at /media/disk :

    dd if=/dev/sda of=/media/disk/disk-image.img

    EDIT: to save on disk space--

    dd if=/dev/sda bs=64k conv=noerror,sync | gzip -c -9 | dd of=/media/disk/disk-image.img.gz
  • CoLACoLA Posts: 4
    Merci! Do you know about how much smaller they generally get once they're compressed?
    Also, how long does it usually take to copy it, would you say? (I imagine copying 100 GB would take quite a bit)
  • It can take a long time. The compression ratio will depend upon the data.

    You could use rsync if you just need data backup. That would be faster, but disk images can take a considerable amount of time.
  • CoLACoLA Posts: 4
    Thanks bunches! I'll probably go with the dd as I want the entire system copied. Good thing I have those terabyte drives to back it up on!
Sign In or Register to comment.