linux + saving a drive image help

Hi guys.

Could really use your assistance once more.
I think the prob is that I’ve never used linux/unix before which is why I’m having difficulty interpreting what appear to be simple instructions to my Win NTFS formatted brain cells.

What I want to do is take a snapshot of an xppro drive with a couple of programs installed on it and save an image of it on another hard drive full of backups.
Then I can install/uninstall all sorts of random progs to test and when things start going pear shaped just restore the image and start afresh without having to go through a re-install of the os and base apps again.

So I found a prog called Partimage on a live cd called SystemRescueCD (http://www.sysresccd.org/Main_Page)

Unfortunately I just cant interpret the simple instructions in here… http://www.partimage.org/Partimage-manual_Usage

  • 1 Introdction
  • 2 How to save a partition into an image file

sda/hda - ?
Image file to create - ?
Save partition to file - yes
Connect to server - no
Compression - .bz2 will do I think
Options - ?
Image split - auto will do

Thats it!

I’m backing up the drive image onto a hd with other backups already on it so it MUST NOT wipe the drive.

Any ideas? Or can anyone suggest a better free alternative.

Cheers

ghost4linux is what I use, also a livecd, allows you to ftp the image it creates and many other really cool things.

DT.

cheers DT - I’ll check it out.

Could dd not be used?

To Backup to a compressed image

dd if=/dev/hdx | gzip > /path/to/image.gz

To restore

gzip -dc /path/to/image.gz | dd of=/dev/hdx

Guys - I’m afraid I just dont understand linux at all.

@drezha - thanks but I have no idea what you are talking about so I’ve no idea if it will do or not.

@DT - I’m struggling to find any tutorial that I can undertand from a non-linux users perspective. Is there a way to not bother with the networking side of things as all I need to do is take an image of one XP NTFS drive and dump it onto another XP NTFS drive in the same case as a file without affecting the contents of the second drive?

Update:
ok - after a lt of googling I’ve found the system rescue cd has on it dcfldd which I believe is an enhanced version of dd
http://dcfldd.sourceforge.net/

I’ve also figured out what hda and sda refer to pata/sata hds respectively. and any numbers after them will refer to the partitions on the drives.
still not sure about dev

So I need to find out what I’ve got in terms of drives and partitions for this linux terminology.
Does dd take only the data and produce a compressed image file? Or is it only for taking a complete image and replacing my destination drives contents?

dev is the path. Everything in linux is pretty much seen as a file. Thus the hard drives are seen under /dev/ (not sure what or why but they are :wink: )

Your correct, generally PATA is hda and SATA is sda, however external drives are also given an sdx reference. The first hard drive is hda, then hdb and same for SATA/USB etc etc.

As for the dd comment, that was aimed at DT or someone more in the know… If it’s any helped, I moved my server primary hard drive from a 20Gb HD to an 80Gb by using dd and then increasing the partition size. This copied EVERYTHING (including MBR) over so I didn’t have to re install anything and everything was fine.

The dd command above will copy the hard drive specified in the first section. The | symbol then pipes the output from the first command into the second command. This creates a compressed image on the drive.

Example
Want to copy disk A (PATA) to disk B (SATA or USB) in compressed image (as you want to)
Disk A = /dev/hda
Disk B = /dev/sda1 (1 is the partition number)

Disk B has to be mounted…
So mount the drive if it’s not done already (Ubuntu generally detects and mounts them).

mount /dev/sda1 /mnt/External

This mounts the second hard drive in the folder /mnt/External. You may have to change permissions to allow red/write access

chmod -R 777 /mnt/External

Then use the command

dd if=/dev/hda | gzip > /mnt/External/image.gz

This will create the compressed image of disk A in the file image.gz in the root of the external drive.:slight_smile:

Drezha - thats awesome mate - thanks.

I’ll give it a shot today.

Sorry for the delay in getting back to you but I had ANOTHER DAMN HARD DRIVE FAILURE!!!

So thats the 4th drive in the last few weeks!!
(5th if you count a doa 750GB samsung F1)
wtf is going on?

This time it was a 3 month old external WD mybook 500GB.
I had to make the choice - warranty or try to recover the data.
I had to chose the data
Fortunately it looks like it was the psu or perhaps also the pcb that fried so I’ve been able to copy all my data onto another hd.

Needless to say I’m never going to buy an all in one external hard drive again.

Thats the reason I’ve not bought an all in one job. That and I can chop and change the hard drives in my caddy as and when.

Glad I could help.

Just following on from this in my quest for thread domination.

I used PING to make a full disk image backup across the network
http://ping.windowsdream.com/