[TriLUG] backup up a laptop disk for replacement

Tanner Lovelace lovelace at wayfarer.org
Fri Nov 8 09:19:49 EST 2002


On Fri, 2002-11-08 at 06:02, Rodent of Unusual Size wrote:
> Roy Vestal wrote:
> > 
> > or just dd from drive to file then new drive from file
> 
> okey, i'm thick and don't do this sort of stuff often (thank
> goodness!)..  any special arguments to dd?  and how do you
> specify/determine the amount of data to dd?  this specific
> thing i've never done before.
> 

How big is your hard drive?  At the time I did this, most
linux filesystems (i.e. the ones I was using) wouldn't
let you create a file bigger than 2GB.  So, you had to break
it up into 2GB chunks.  So, something like this would 
work (note that I've placed each option on a line with
an explanation:

dd	\	# The dd command. :-)
bs=1024 \	# The block size in bytes (or specify other sizes in KB)
if=/dev/hda \   # Input file (replace with your hard drive device)
of=/net/path \  # Output file (make sure you can remote mount your file)
skip=2048 or 0\ # How many blocks from the front of the HD to skip  
count=2048  \   # How many blocks to copy using dd.  (Don't use
                # this on the last chunk, let dd calculate it)

Use this command to copy 2GB chunks from your hard drive
to files on a remote disk.  Then, to put them back on a hard
drive, you need to change the skip parameter to be seek (skip
specifies how many bytes to skip on input while seek tells
how many to skip on output).

Make sure you know beforehand how big the hard drive is (so you can
calculate how many chunks you'll have to break it up into).
[...]
> 
> please, small words and complete steps, as though i'm a newbie (which
> i aam for most of the actions needed for this, at least for linux).

Someone could probably come up with a script to do this.  Anyone
up for a small challenge? :-)

> i find it interesting that no-one has commented on dump/restore.
> does no-one even use them anymore?

Not much.  Some newer filesystems like reiserfs don't even support
dump/restore. :-/

Cheers,
Tanner
-- 
Tanner Lovelace | lovelace at wayfarer.org | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint = A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
          Si hoc legere scis, nimium eruditionis habes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20021108/198af929/attachment.pgp>


More information about the TriLUG mailing list