LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Making an offline image of partitions to USB drive (http://www.linuxquestions.org/questions/linux-general-1/making-an-offline-image-of-partitions-to-usb-drive-682703/)

jnriopel 11-11-2008 04:14 PM

Making an offline image of partitions to USB drive
 
I just finished installing a fairly complicated setup on a RHEL 3 AS machine. Now that it works, I would like to take a snapshot of my drive to an external USB HD. I do a similar thing with BartPE and Driveimage XML on my windows boxes, but my standalone boot CD doesnt recognize the RAID controller in this IBM x3550 appliance. And I am not sure it would recognize the ext3 partitions. The whole of the system is less that 300 GB.
Ideally, I would shutdown my running server, hook up the external USB HD, boot in some kind of recue mode maybe? Some way that the production system would not be accessed so no files would be busy. Then mount the USB drive, and dd or something the 2 partitions to the external drive. (/boot and /) Can anyone advise? I started looking at Amanda, but it seems a tad complicated for my single machine. There is no room for another HD in the server, it is in a rack, but I can go up to it, connect the external HD, and reboot the box while in front of it and see the boot, etc.

tgreaser 11-11-2008 05:09 PM

http://sourceforge.net/projects/g4l

Junior Hacker 11-11-2008 11:51 PM

I use BootitNG exclusively myself. It makes compressed images containing only allocated data, not deleted or un-allocated space making the image smaller. DD makes an image of an entire partition containing every sector.
You can still make compressed images with DD also.

Duck2006 11-12-2008 08:20 AM

Or part image will do it for you to.

jnriopel 11-12-2008 01:07 PM

Good start
 
Quote:

Originally Posted by tgreaser (Post 3338797)

Thanks for the pointer!

I've also received suggestions for FOG (aka FreeGhost) and MondoRescue.

I burned the G4L ISO and am going to experiment with it. Documentation is sort of hard to come by, or am I missing something?

More details about my setup: The external HD is currently formatted as NTFS and already has files on it, but has a lot of room left. I am not sure what the dump of my source disk would look like on this, assuming it works. Would it be 1 big file? 3 Files (1 per partition)? It would be great if I could just come up with a setup whereby if needed, I could hook up the external HD on which I did a backup to the system, boot from a G$L CD, then restore everything to a (presumably) new HD and then reboot the box and see it come up like it was when I did the backup. I dont care or mind if it copies useless stuff like the content of the swap partition, as long as I am able to easily recreate everything easily from my backup. I suppose less desirable but not out of the question would be to reinstall the OS from my RHEL CDs, specifying the partition layout (including a swap file), then restore my data (from /boot and / backup) as a two-step process...

jnriopel 11-12-2008 01:51 PM

Hum... 4GB limit?
 
Quote:

Originally Posted by Junior Hacker (Post 3339030)
I use BootitNG exclusively myself. It makes compressed images containing only allocated data, not deleted or un-allocated space making the image smaller. DD makes an image of an entire partition containing every sector.
You can still make compressed images with DD also.

Thanks for the hint. I downloaded the trial version from the website, made a CD, booted from it, and was happy to see that it recognized my local partitions and my external USB HD. Where things became less rosy though is that after I successfully copy/pasted my small /boot partition to the external NFTS/HPFS HD, I tried to do the real work, copy my 140GB partition. But it asked me about maximum file size and stops at 4GB. Writing this, I realize maybe it would have created multiple 4GB files, whereas when I saw the message, I assumed the program was maybe crippled since it was an eval version. Let me go try again...

jnriopel 11-12-2008 02:06 PM

Kewl! (Once you get to know it)
 
Quote:

Originally Posted by Junior Hacker (Post 3339030)
I use BootitNG exclusively myself. It makes compressed images containing only allocated data, not deleted or un-allocated space making the image smaller. DD makes an image of an entire partition containing every sector.
You can still make compressed images with DD also.

My 140GB partition is being backed up, as we speak! I tried using BiNG for the 2nd time, and as I surmised, it didnt have an absolute limit of 4GB, just creates as many files as it needs of that size, which is fine.

So I expect I I got a disk crash, or wanted to replace the two 70GB HD hardware-raid into 1 logical 140GB drive with 2 140GB drives set up in mirroring RAID, then I would be able to do this by replacing the drives, doing the RAID type switch with the RAID controller, then reinstalling my RHEL from the 4 original CDs, making sure to request the same partitioning setup. Then use BinG to copy over the stuff from my backup to the system, right? This is getting exciting! Too bad I dont happen to have other fancy SAS drives to test the process at this moment.

jnriopel 11-12-2008 02:15 PM

Close but no cigar it looks like
 
Quote:

Originally Posted by Junior Hacker (Post 3339030)
I use BootitNG exclusively myself. It makes compressed images containing only allocated data, not deleted or un-allocated space making the image smaller. DD makes an image of an entire partition containing every sector.
You can still make compressed images with DD also.

Rats. After the backup appeared to finish, I shut down the machine, moved the exteral HD over to my laptop and when I looked where I expected to find my data, I found only a part2.IMG file (4,194,304 KB) and a part2.001 (360,127 KB) file. I expected many more than that, although there is a slight chance umber-compression occured as this sytem will be storing a lot of data in a Oracle DB which right now is mostly empty... Ideas?

jnriopel 11-12-2008 02:25 PM

Can you expand on that a little bit?
 
Quote:

Originally Posted by Duck2006 (Post 3339470)
Or part image will do it for you to.

Is it a open-sourc program, or a linux command, or...?

jnriopel 11-12-2008 02:28 PM

Will g4l recognize a previously-formatted NTFS drive?
 
Quote:

Originally Posted by tgreaser (Post 3338797)

I have a fairly large drive that I use to backup other machines on (Windows) with DriveImage XML and a BartPE standalone boot environment. I would like to be able to use that as a destination with g4l. Do you know if this is a hard thing to do?

Duck2006 11-13-2008 06:55 AM

http://www.psychocats.net/ubuntu/partimage

Junior Hacker 11-14-2008 07:40 PM

Quote:

I found only a part2.IMG file (4,194,304 KB) and a part2.001 (360,127 KB) file.
When using bootitng, you can set the maximum file size during imaging. The default is 2GB, I usually set it at 4GB because I back up to an NTFS file system that can handle unlimited file size.
And yes, because it compresses it, your backup file size is smaller. My typical Linux OS fresh installation image size ia around 800MB, Windows XP a little over 2GB, Windows Media Center is over 4GB with all updates applied. If you have personal data also, it goes up in size.

jnriopel 11-15-2008 06:27 AM

PartImage Rulz!
 
Quote:

Originally Posted by Duck2006 (Post 3340541)

I tried PARTIMAGE and it really rocks. It recognized my external 500GB USB HD right away, as well as the SCSI controllers of both machines I was trying to backup. The tutorial you pointed me to was also extremely useful, it showed me how to create a new partition on the drive, and how to create an ext3 filesystem on which I now have the dump of the 2 partitions of the two machines I wanted.

The only thing I havent tried is the restore, but I have 95% confidence it will work!

Thank you Thank you Thank you !


All times are GMT -5. The time now is 11:38 PM.