PDA

View Full Version : backing up HDD's with dd



mwer
03-13-2004, 03:57 PM
I just started using the Knoppix CD yesterday. (It's actually the first deb-based distro I've tried.)

I'd like to use to it back up a WinXP machine. My intent is to just boot and dd the whole HDD to an NFS share on a mirrored Sun machine. That way I get the whole MBR and everything. I don't care much about how long it takes, just as long as it works. I figure I finally have the XP install all tweaked and tuned the way I want it and have all the apps I need installed and registered, so I should grab an entire image while it's still good. Over time, the system will probably get broken, distorted, or infected, and restoring an image using Knoppix is a lot simpler than reinstalling. It'll even let me keep my XP activation that way.

Is this a good idea? Is it a bad idea? I've never heard of anyone doing anything similar. Is there anything I should take into consideration (besides needing a HUGE storage volume)?

firebyrd10
03-13-2004, 04:24 PM
I'm not to sure it would work because windows xp uses a NTFS filesystem. if your useing the offical knoppix then there is no safe way to write a ntfs file (thats more of a problem when restoring really.)

mwer
03-13-2004, 04:29 PM
That's why I'm thinking the dd utility would be a good way to do it. dd is like rawrite.exe for windows. It records a raw bit-by-bit copy of the device without looking at blocks and filesystems. You don't even need to mount the desired volume to copy it.

mwer
03-13-2004, 07:13 PM
This is what I had in mind. (http://www.knoppix.net/docs/index.php/dd command)

Dave_Bechtel
03-14-2004, 02:10 AM
--Instead of dd, see:
' apt-cache show partimage '
' man partimage '


That's why I'm thinking the dd utility would be a good way to do it. dd is like rawrite.exe for windows. It records a raw bit-by-bit copy of the device without looking at blocks and filesystems. You don't even need to mount the desired volume to copy it.

GainesTR
03-14-2004, 03:10 AM
I use a utility from www.novastor.com called instant recovery. It is based off some type of Linux and I use it to back up ANY type of OS. It will let you back up to almost any type of media as well as backup up across the network.

Unless someone else can show me that DD works the same, I won't use anything else.

Just a little FYI.

:lol:

firebyrd10
03-14-2004, 04:40 AM
oH DD is a raw writing utility? thats exactly what I have been looking for!

I had no idea. Now I can finally move my hardrive info to another bigger hardrive. (needed this because I'm useing a HP which has a recovery partition)

Hasse
03-15-2004, 02:15 AM
I have been using dd successfully, backing up a complete HD to an image file. It does not check any file sstem, just copies theraw data!

dd if=/dev/hda of=/mnt/hdb1/hda.img bs=1M
or cleaning out unused space and compressing it

# For every partition x
mount /dev/hdax
dd if=/dev/zero of=/mnt/test/null.txt bs=1M ; rm -f /mnt/hda1/null.txt
umount /mnt/test
# Backup with compression
dd if=/dev/hda bs=1M | gzip -9 -c > /mnt/hdb1/hda.img
I have also moved partitions from one HD to another this way, but it only works if the head count is the same![/code]

sakiZ
01-24-2005, 07:41 PM
Well, I finally found someone in this forum who backs up to an image file.

That is what I tried last week and NOW thanks to my own INCREDIBLE STUPIDITY
I need to restore my Knoppix partition from that file. (Long story. Let's not go there)

When I backed up the Knoppix partition I did:

dd if=/dev/hdb2 of=/mnt/hda6/hdb2.img

To get restore Knoppix to /dev/hdb2 I assume I need to

mount -t /dev/hda6/hdb2.img

first and then

"dd" back to the original /dev/hdb2 partition.

Any tips/tricks/caveats/advice before I attempt this?

Oh, I assume I should format the /dev/hdb2 partition first to start clean, right?

Thanks,

sakiZ

Dave_Bechtel
01-25-2005, 06:37 AM
--You're on the right track, but you don't even need to mount the image file; just:

' time dd if=/mnt/hda6/hdb2.img of=/dev/hdb2 bs=10M '

--MAKE SURE /dev/hdb2 is unmounted **before** you do this!!
And there is no need to reformat 1st, because DD will return it to the exact same state it was in at the time of backup.

--Good luck, and keep backing up regularly.


Well, I finally found someone in this forum who backs up to an image file.

That is what I tried last week and NOW thanks to my own INCREDIBLE STUPIDITY
I need to restore my Knoppix partition from that file. (Long story. Let's not go there)

When I backed up the Knoppix partition I did:

dd if=/dev/hdb2 of=/mnt/hda6/hdb2.img

To get restore Knoppix to /dev/hdb2 I assume I need to

mount -t /dev/hda6/hdb2.img

first and then

"dd" back to the original /dev/hdb2 partition.

Any tips/tricks/caveats/advice before I attempt this?

Oh, I assume I should format the /dev/hdb2 partition first to start clean, right?

Thanks,

sakiZ

turbine
01-27-2005, 10:13 PM
mwher, I've been using Partition Commander to do what you are wanting. Been using it for several years now without any hitches. Boots off of its own floppy which is nice if your os is really hosed and you need to restore.