LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Best way to create an image of my hard drive? (https://www.linuxquestions.org/questions/linux-newbie-8/best-way-to-create-an-image-of-my-hard-drive-886283/)

veeruk101 06-14-2011 10:35 AM

Best way to create an image of my hard drive?
 
I've performed a clean install of Linux on my system, and would like to create a snapshot of my whole disk so that I can go back to a fresh state immediately.

I used to use DriveImage XML and it was a FANTASTIC program, but unfortunately the boot CD containing it can only be created by having Windows installed. So it might be time to explore a new program that is equally simple and effective as that one.

I'd like your recommendations of imaging programs that are free, and that work off a boot CD/DVD (because the live backup thing generally takes much longer for imaging an entire disk).

One thing I liked about DriveImage XML was that it stored the backup in a fairly readable format, so if one day DriveImage XML were no longer available you wouldn't lose your backed up data. Any such programs?

Also, would these programs work for a drive that contains an encrypted root partition (i.e. enabling the encryption checkbox in the CentOS installation)?

pentode 06-14-2011 10:44 AM

If I understand your question, I think the standard Linux dd command will work. Not sure about the encryption issue.

Have a look here:

http://www.backuphowto.info/linux-ba...-disk-clone-dd

veeruk101 06-14-2011 10:58 AM

I should have mentioned that those programs also offer the option not of taking a raw dump of the drive, but of copying only the used space. So a 60GB disk with only 12GB used would result in a 12GB image, whereas I think the dd command would result in a 60GB image.

travisdh1 06-14-2011 11:13 AM

Have you looked at clonezilla? It's worked well for me so far in very limited use (one windows machine and one linux machine.)

markush 06-14-2011 11:17 AM

I've recently used Clonezilla to create an image of my Windows 7 Partitions. I created the images on an external harddrive. Afterwards I've repartitioned the disk (where formerly Win7 resided) and installed OpenBSD. Last week I needed Windows 7 again, restored it with Clonezilla and Win7 is running properly now.

I think when it works for Windows it will be also an excellent tool to backup Linux-partitions. I have used the Clonezilla-Live-CD, but there is also an USB-Image available.

Clonezilla works very fast and compresses the files so that free diskspace doesn't use any space on the backup-medium.

Markus

veeruk101 06-14-2011 12:51 PM

Thanks for the suggestion, I'm looking at clonezilla right now.

Is it correct of me to say that if the drive I'm backing up contains a 100MB boot partition and an 80GB root partition that is ENCRYPTED, then clonezilla won't be able to inspect the filesystem and back up only the used portion? (And for a restore, it won't be able to enter the encryption password if I provide it and backup the image to the encrypted partition.)

Does anyone know of any software that would be able to do this, where it recognizes the Linux encryption and works with it (obviously with a user-supplied password of the encrypted partition)? Because that would be the best of both worlds, where I could continue to have an encrypted partition, but also not have huge drive images that take a very long time to backup and to restore.

markush 06-14-2011 01:02 PM

Quote:

Originally Posted by veeruk101 (Post 4385533)
Thanks for the suggestion, I'm looking at clonezilla right now.

Is it correct of me to say that if the drive I'm backing up contains a 100MB boot partition and an 80GB root partition that is ENCRYPTED, then clonezilla won't be able to inspect the filesystem and back up only the used portion? (And for a restore, it won't be able to enter the encryption password if I provide it and backup the image to the encrypted partition.)
...

Mh, this is a very special case, if I were you I would try this out on a virtual machine. Look here: http://sourceforge.net/projects/clon.../topic/4406233

Markus

jefro 06-14-2011 04:01 PM

Clonezilla can clone it based on file by file if it can read or has read support for the filesystem. If not is reverts to dd.

frieza 06-14-2011 04:05 PM

yeah i second that on DD, DD is what is referred to as a 'bit copier', it copies the raw partition bit for bit (free space included) irregardless of file system or encryption.


All times are GMT -5. The time now is 06:41 PM.