Hello,

It took reading the source code of a backup front-end to figure out that 
"incremental backups" are not the same thing as "multiple incremental backups 
on the same medium; spilling over to the next disk if necessary."

As the handbook (section 18.12.1) says, dump has quirks due to its design 
dating back to 1975. Optical write-once media was punch tape or cards. Seeking 
to the middle of the media was time consuming, so daily tapes were simply 
written from the beginning, then rewound.

So, knowing this, I decided to test a full dump and restore to DVD+R media, 
following the example in the dump(8) man page. I suspect that the example was 
written with DVD-R in mind, but according to wikipedia,
http://en.wikipedia.org/wiki/DVD-R#Recordable_DVD_capacity_comparison
the smaller DVD+R media can handle the example in dump(8) with 184 2048 byte 
blocks to spare (implying the example intended 3576 spare sectors). The package 
for the DVD media just says "4.7 GB" with only 2 significant digits.

I used the following command for the dump:
$/sbin/dump -0u -L -C16 -B4589840 -P 'growisofs -Z -dvd-compat 
/dev/cd0=/dev/fd/0' /home

Growisofs said 4700372992 bytes were written on the first disk (my notes don't 
record exactly which disk that was). That works out to 4590208kiB or 2295104 
sectors.
Edit: This matches the Wikipedia number; I assumed it to included zero padding

I tried the restore on a fresh freeBSD 8.0 install with no user accounts 
created (and atapicam not yet enabled):
dusty# cd /home
#restore -r -P 'dd if=/dev/acd0 of=/dev/fd/1 bs=2048 count=2294920'
warning: ./.snap: File exists
expected next file 706561, got 4
unknown tape header type -365754194
abort? [yn] n
resync restore, skipped 162 blocks
expected next file 847904, got 0
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x10 ascq=0x00
dd: /dev/acd0: Input/output error
2294208+0 records in
2294208+0 records out
4698537984 bytes transferred in 2781.175375 secs (1689407 bytes/sec)
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: dd if=/dev/acd0 of=/dev/fd/1 bs=2048 
count=2294920)
unknown tape header type -54549208
abort? [yn] n
resync restore, skipped 464 blocks
expected next file 5040133, got 0
1201264+0 records in
1201264+0 records out
2460188672 bytes transferred in 1330.121340 secs (1849597 bytes/sec)
dusty#

The "unknown header type" errors appear to be unrelated to the major read error 
reported at the end to the first disk. I suspect those may be corruption caused 
by a buffer underrun or local vibration.

Questions:
1. How do I determine which files (if any) are affected? is verbose mode 
required for that?
2. It appears the first disk lost 712 sectors of data (and a total of 896 
sectors of capacity) with that read error. Should I just burn the disks 
1024-4096 sectors short?
3. What is the best way to verify dumps at dump time?

I still have the data on another disk. I can restore it with dd if need be. I 
verified the newfs command appears to create a ".snap" directory by default now.

Regards,

James Phillips





_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to