Jon Nelson Thanks for you input. TED Jon Nelson wrote:
On Wed, 29 Dec 2004, Ted Hilts wrote:
I used "dd if=/dev/hdb2 of=/dev/another_drive_on_same_machine/image_file" (where hdb2 contained the SuSE 9.1 installation with top directory root or "/" ) and from where I was executing the"dd" command (as root) in order to initially create a complete backup of the disk in the form of an image file located on "another_drive_on_same_machine" so that I could move it to another LAN computer capable of blasting it onto a DVD.
Now the "another_drive_on_same_machine" happens to be mounted as /HDD2 in the installation on /dev/hdb2. HDD2 is my drive for backups. It has to be mounted and therefore is also found in the directory path under "/".
This of course leads to the problem where "dd" (essentially a file copy utility) includes the content of /HDD2 and there is no "exclude" provision in the "dd" command. I could move the contents out of HDD2 (80 Gig drive) but I do not have an unused drive on the same machine and the drives on the other LAN machines are not able to take this additional load to use as a temporary storage.
1. dd is NOT a file copy utility. In the above scenario, it is being used to copy disk blocks.
2. use rsync. The most common and basic invocation is rsync -av source_dir dest_dir
read up on how rsync works if you have trouble rsync can do exclusions.
dd is so completely the wrong tool for that job.
Does anyone have any ideas how I might create a DVD image file that gets around the problem I am having with "dd" (that is I cannot give it a directory exclusion as "/HDD2").
Yes. Use tar.
tar cvf name_of_tarball stuff_to_backup --exclude="/excludeme"
Unless you need to don't bother with compression it just slows the process down.
-- Carpe diem - Seize the day. Carp in denim - There's a fish in my pants!
Jon Nelson