Backup Entire Harddrive to an Image

Tagged with: , , , , , , , ,

Backup content of the harddrive to a file. Creates an image of the drive


dd if=/dev/sda of=/tmp/sda.iso

4 Responses to “Backup Entire Harddrive to an Image

  • 1
    Sreenadh
    December 7th, 2008 00:12

    Use partimage. It backups only used spaces. But dd extracts used space as well as unused space.

  • 2
    Ahmed Hobaran
    January 2nd, 2009 17:01

    Can you provide some more details on this?

  • 3
    tctc
    January 28th, 2009 23:57

    Change the file name in your example to something generic like *.img not *.iso since dd does not create iso9660 file structures!

  • 4
    SpawnHappyJake
    May 2nd, 2011 06:03

    About having *.iso in the example… It’s important to remember that changing the file extension doesn’t do anything magical (unless you are saving an image in GIMP XD). The file extension is simply part of the file name; nothing more; nothing less. You don’t actually NEED file extentions. However, there are conventions. When you add the *.iso file extention, you are proclaiming to everyone that that file is an image file containing the ISO 9660 filesystem or a filesystem compatible with the ISO 9660 filesystem (such as UDF) or a combination. You could name the file *.spaghettimonster, and it won’t magically convert it to anything. Likewise, naming an image of a FAT32 partition to *.iso won’t make it have such a filesystem. But if you are imaging a CD that would image to something worthy of the *.iso extention, it’s ok to do that. That’s almost all optical media except for audio CDs. Just know that dd pads zeros onto the end of the image, so your hashes won’t match with the rest of the world. Psst – check out ddpt.

Leave a Reply