Answer From Bruce Harada
Comments by Heather Stern
Hi. I read your answer to the person trying to backup their notebook's hard drive with tar. The way I do backups of my notebooks is as follows:
This will send the entire contents of /dev/hda to the remote directory as a single file.# dd if=/dev/hda of=/tmp/mnt/backup/notebook-hda
which will compress it for you (hopefully to below the 2GB limit, although it's probably a good idea not to try this unless you're positive that the final file will come in under 2GB). Compressing it will take longer than you think it should, though, so be ready to wait a while.# dd if=/dev/hda | gzip >/tmp/mnt/backup/notebook-hda.gz
or, if you compressed it,# dd if=/tmp/mnt/backup/notebook-hda of=/dev/hda
This backup takes care of everything, including partition tables and bootblocks, which (in my book) makes it much more reliable than tar. I've used it to back up some of my older notebooks, with around 500MB hard drives, and the final (compressed) file was about 350MB. Both backup and restore worked fine, without any problems.# gunzip -c /tmp/mnt/backup/notebook-hda.gz | dd of=/dev/hda
That's about it - I hope it's of help.
-- Bruce Harada
[Heather] it's worth noting that this works best when restoring to the same size hard drives, or especially, the exact same drive; a larger one may leave its extra space invisible, a smaller one will have bits falling off the end, and some drives of the same approximate size have different geometries, so fdisk may think strangely of you
However for backing up your own notebook to a stable desktop server it works great!
1 2 3 4 6 7 9 | ||
11 12 15 16 18 | ||
20 22 24 25 26 28 29 |