Re: Making an image of my HDD



dd if=${device} conv=sync,noerror bs=64K | ssh -l ${user} ${host} "dd
of=file.bin bs=64K"

Unless you need to encrypt, I recommend that you just use netcat
instead of ssh, as it will be faster.

I also recommend a larger block size. Using a 64k block size will
take a long time, even if you take encryption out of the equation.

You should also boot from a Live CD; using dd to backup a mounted
filesystem can easily result in a corrupt backup image. Off the top
of my head, I seem to remember Trinity Rescue Kit & Knoppix having
netcat, dd, and ssh.

The "noerror" conversion is unneccessary. If dd is giving you input
errors, replace your hard drive and use dd_rescue to salvage your
data. Also, I don't think you need to use the "sync" option in this
case. I've never used it for my backups, and they have turned out
perfectly.

As long as you triple-check your if= and your of= before you hit enter
you shouldn't have any major issues. :-)

I also recommend you compress the image to save bandwidth and storage
space, although bzip2 has a 900k cap on its block size, so any larger
blocksizes passed to dd will be moot.

dd if=${device} bs=900k | bzip2 -9c | ssh -l ${user} ${host} "dd
of=backup.img.bz2"

Then verify the image.
on the laptop:
dd if=${device} bs=50M | md5sum

on the server:
bzip2 -d < backup.img.bz2 | md5sum

Someone please correct me if this is wrong.

-Elijah

--
http://elijahr.blogspot.com/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Registration Confirmation Page
    ... > I would recommend that you not do this. ... Use the DrawString method to paint the numbers on the bitmap. ... > Then you would use the same graphics instance to alter the bitmap. ... You have to encrypt ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Registration Confirmation Page
    ... > I would recommend that you not do this. ... Use the DrawString method to paint the numbers on the bitmap. ... > Then you would use the same graphics instance to alter the bitmap. ... You have to encrypt ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Was shutting off alt.* a test run?
    ... netcat wrote: ... Infocom ever did. ... Care to recommend any? ...
    (rec.arts.sf.fandom)
  • ssh: setld conflict when updating
    ... I am currently running ssh 3.2.0 including patches ... (Security Related Patches) ... I would now like to update to ssh 3.2.3, as available from the HP website. ... The installation instructions included with the kit recommend to remove all ...
    (Tru64-UNIX-Managers)
  • Re: SSH via Expect disconnects
    ... >> I am using an expect script to initiate an SSH session to another host ... >Otherwise you will have to save your password plain-text inside your script. ... Oh, I agree that it's always timely to recommend ssh keys, AND ... ing, again, that a move to ssh keys doesn't serve him better. ...
    (comp.lang.tcl)