dd , size limitations?

dd , size limitations?

Post by patri » Wed, 09 Jul 2003 04:12:38



hi

what i want:
-backup my partition /dev/hda1 to a separate volume , into an image
(like /extern/image.img  where /dev/hdc2 is mounted to /extern )
-what i have:
1 root partition /dev/hda1 with 6 GB
2 data partitions in /dev/hdc with 15 GB each

-what i did:
boot from knoppix-cd ( gives me a cd-based , ram disk-linux so i can
access my usual root system without interference)
dd if=/dev/hda1 of=/extern/image.img

-what i got:
a 2GB image file and an error about the size (like file too big) <--
this might not be the literal error message but its close enough.

so, after reading man dd and some websites apropos dd,
and not finding anything,
is there a known limitation to the size of files dd can handle?
any parameter that zips the image (making it smaller, since the
original / has about 66% vacancies )?
any other way of backing up a bootable partition so all files and
links are preserved and ready when i blow it back on?

i could use drive image (hang in extra hd with w2k) but would like to
use linux solution if possible.

 
 
 

dd , size limitations?

Post by renrut » Wed, 09 Jul 2003 13:38:50



> any other way of backing up a bootable partition so all files and
> links are preserved and ready when i blow it back on?

I use the following for making a copy of any directory tree (including full
partitions):

(cd source_dir; tar cvf - .)|(cd dest_dir; tar xvf -)

Since you're running off a cd, you mount your / partition to somewhere like
/mnt/hda1.  Then, in your particular case, the command would be

(cd /mnt/hda1; tar cvf - .)|(cd /extern; tar xvf -)

The destination partition will of course have to be formatted with same
filesystem as the source partition before doing this.

To convince yourself this really is a full and correct image, try updating
your bootloader to boot into the copied / partion e.g root=/dev/hdc2 w/
GRUB and confirm everything is working as expected (not very scientific,
but it gave me peace of mind when I first tried this).  I happen to have
everything under one / partition, though.  If you have your /usr or /var in
separate partitions then this method will copy them as well, so YMMV.

 
 
 

dd , size limitations?

Post by renrut » Wed, 09 Jul 2003 13:52:10



> (cd /mnt/hda1; tar cvf - .)|(cd /extern; tar xvf -)

>  If you have your /usr or /var
> in separate partitions then this method will copy them as well, so YMMV.

Actually, since you would be mounting your / partition standalone, it would
copy the / partition only since there would be no "sub-mountpoints".  The
above statement would only be true if you weren't running off a CD-based
root system and your / filesystem had had the /usr and /var partition mount
points.  Oh well, you get the idea.. :-)