[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: verification after cd burn



On Wed, Dec 08, 2004 at 05:47:53PM -0500, Kudret Güler wrote:
> Hi,
> 
> I use nautilus-cd-burner to backup some important stuff(binary as
> well) on CD-Roms. How can I verify that the files on the cd and the
> files on the hard drive are exactly the same.
> 
> I use diff on directories with -r switch. Is it totally safe? What
> about md5sum?

I have used both and they seem good to me.

The following is part of a backup script I use:

echo "Copying var/cache/apt ..."
cp -r /var/cache/apt backupcd
cd backupcd
for i in * */* */*/*; do
    if test -f $i; then
        md5sum $i >> apt.md5
    fi
done
cd -

This copies the contents of /var/cache/apt to a directory, and
calculates md5sums for all files including two levels of
subdirectories. The selection of files could probably be done with
`find', but this works for me.

Now you can make an iso file of that dir and burn it. Then mount the
burned cd, go to the cdrom dir and check the md5 sums with `md5sum -c
apt.md5'.

There is probably a theorethical chance not equal to zero that a cd
burn fails and you don't notice it in the md5 check. If you're
paranoid burn a second cd.

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key: keyserver.net ID 0x1735C5C2
"Let your advance worrying become advance thinking and planning."
 - Winston Churchill

Attachment: signature.asc
Description: Digital signature


Reply to: