PDA

View Full Version : [Solved] dump/restore failures - help!


Weaseal
January 30th, 2009, 02:21
I used dump to make some snapshots of my filesystems (/usr, /var, and /, individually).

Dump went OK with no errors or warnings. Restore, however, is a different story. I made a log as I was doing it. It starts out OK, but quickly goes badly.

Here's how it starts:$ cat restore_rvf | head -n 20
Script started on Fri Jan 30 09:01:46 2009
[root@relnor /mnt/freebsd/usr]# bzcat /mnt/usb/Backup/usr.ar0s1f.dump-0.1.18.2009.bz2 | restore -rvf -
Verify tape and initialize maps
Dump date: Sun Jan 18 19:33:54 2009
Dumped from: the epoch
Level 0 dump of /usr on relnor.com:/dev/ar0s1f
Label: none
Begin level 0 restore
Initialize symbol table.
Extract directories from tape
Calculate extraction list.
warning: ./.snap: File exists
Make node ./bin
Make node ./include
Make node ./include/altq
Make node ./include/arpa
Make node ./include/bsm
Make node ./include/bsnmp
Make node ./include/c++
Make node ./include/c++/3.4But then...$ cat restore_rvf | tail -n 20
warning: cannot create hard link ./sbin/idprio->./sbin/rtprio: No such file or directory
warning: cannot create hard link ./sbin/swapinfo->./sbin/pstat: No such file or directory
warning: cannot create hard link ./sbin/setfsmac->./sbin/setfmac: No such file or directory
warning: cannot create hard link ./sbin/watchdog->./sbin/watchdogd: No such file or directory
warning: cannot create hard link ./compat/linux/usr/libexec/getconf/POSIX_V6_ILP32_OFFBIG->./compat/linux/usr/libexec/getconf/POSIX_V6_ILP32_OFF32: No such file or directory
warning: cannot create hard link ./compat/linux/usr/sbin/iconvconfig.i386->./compat/linux/usr/sbin/iconvconfig: No such file or directory
warning: cannot create hard link ./compat/linux/usr/share/locale/af/LC_TIME/coreutils.mo->./compat/linux/usr/share/locale/af/LC_MESSAGES/coreutils.mo: No such file or directory
warning: cannot create hard link ./compat/linux/usr/share/locale/be/LC_TIME/coreutils.mo->./compat/linux/usr/share/locale/be/LC_MESSAGES/coreutils.mo: No such file or directory
warning: cannot create hard link ./compat/linux/usr/share/locale/bg/LC_TIME/coreutils.mo->./compat/linux/usr/share/locale/bg/LC_MESSAGES/coreutils.mo: No such file or directory
warning: cannot create hard link ./compat/linux/usr/share/locale/da/LC_TIME/coreutils.mo->./compat/linux/usr/share/locale/da/LC_MESSAGES/coreutils.mo: No such file or directory
Set directory mode, owner, and times.
Check the symbol table.
bad entry: incomplete operations
name: ./jails/ports/boot/boot
parent name ./jails/ports/boot
sibling name: ./jails/ports/boot/boot0sio
entry type: LEAF
inode number: 400862
flags: NEW
abort? [yn] In the middle, I see:extract file ./jails/ports/boot/boot0sio
extract file ./jails/ports/bin/echo
extract file ./jails/ports/bin/ps

bzcat: I/O or other error, bailing out. Possible reason follows.
bzcat: No such file or directory
Input file = /mnt/usb/Backup/usr.ar0s1f.dump-0.1.18.2009.bz2, output file = (stdout)
extract file ./jails/ports/bin/ed
End-of-tape encountered
Warning: End-of-input encountered while extracting ./jails/ports/bin/ed
Add links
Create hard link ./jails/ports/bin/tcsh->./jails/ports/bin/csh
Create hard link ./jails/ports/bin/red->./jails/ports/bin/ed
warning: cannot create hard link ./jails/ports/bin/link->./jails/ports/bin/ln: No such file or directory
warning: cannot create hard link ./jails/ports/bin/unlink->./jails/ports/bin/rm: No such file or directoryCan someone please help with this? This has some pretty critical data in it...

nickolas
January 30th, 2009, 09:34
Try to add -L flag when doing dump.

Weaseal
January 30th, 2009, 14:49
Nickolas,
Thank you for your reply, however, I did use the -L flag -- and the issue below is with restore, not dump. As stated, dump completed with no errors or warnings.

graudeejs
January 30th, 2009, 17:07
have you mounted /tmp ?

see
http://forums.freebsd.org/showthread.php?t=185

Weaseal
January 30th, 2009, 18:12
killasmurf-
Yes, tmp was mounted, however it may have filled up--I didn't check that. Thanks for the tip, I'll try it again tonight after work.

Weaseal
January 31st, 2009, 03:40
Sadly, using a much larger /tmp did not help -- died in the same place, and /tmp is nowhere near full :(Filesystem Size Used Avail Capacity Mounted on
/dev/ad8s1a 496M 222M 234M 49% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ad8s1e 496M 35M 421M 8% /tmp
/dev/ad8s1f 95G 1.5G 86G 2% /usr
/dev/ad8s1d 4.6G 90M 4.1G 2% /var

trev
January 31st, 2009, 03:55
Is there anything relevant in /var/log/messages ?

Weaseal
January 31st, 2009, 05:03
Is there anything relevant in /var/log/messages ?No :/

graudeejs
January 31st, 2009, 12:36
you can try to browse dump in interactive mode.
and then try to extract specific files just to see if dump itself isn't corrupted.
I can't figure any more reasons for this behavior.
dump/restore never failed me.

what keys did you use when you did dump [if you remember], and what keys did you use when you did restore [should be -rf file.dump ]

Weaseal
January 31st, 2009, 18:56
you can try to browse dump in interactive mode.
and then try to extract specific files just to see if dump itself isn't corrupted.
I can't figure any more reasons for this behavior.
dump/restore never failed me.

what keys did you use when you did dump [if you remember], and what keys did you use when you did restore [should be -rf file.dump ]From memory, I believe it was dump -0Lauf. for the restore it was bzcat | restore -rvf -
Thanks for the tip about interactive mode. I will try this soon and post the results.

Weaseal
January 31st, 2009, 22:10
AAH!# bunzip2 -vk usr.ar0s1f.dump-0.1.18.2009.bz2 /mnt/500-1/
usr.ar0s1f.dump-0.1.18.2009.bz2:
bunzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bunzip2: No such file or directory
Input file = usr.ar0s1f.dump-0.1.18.2009.bz2, output file = usr.ar0s1f.dump-0.1.18.2009

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

bunzip2: Deleting output file usr.ar0s1f.dump-0.1.18.2009, if it exists.
bunzip2: WARNING: some files have not been processed:
bunzip2: 2 specified on command line, 1 not processed yet.

Weaseal
January 31st, 2009, 22:41
Tried bzip2 -tvv:# head bzip2-tvv
Script started on Sun Feb 1 05:29:10 2009
[root@/mnt/500-1]# bunzip2 -tvv usr.ar0s1f.dump-0.1.18.2009.bz2
usr.ar0s1f.dump-0.1.18.2009.bz2:
[1: huff+mtf rt+rld]
[2: huff+mtf rt+rld]
[3: huff+mtf rt+rld]
[4: huff+mtf rt+rld]
[5: huff+mtf rt+rld]
[6: huff+mtf rt+rld]
[7: huff+mtf rt+rld]And everything goes smoothly, until...# tail -n 15 bzip2-tvv
[8292: huff+mtf rt+rld]
[8293: huff+mtf rt+rld]
[8294: huff+mtf rt+rld]
[8295: huff+mtf rt+rld]
[8296: huff+mtf rt+rld]
[8297: huff+mtf rt+rld]
[8298: huff+mtf file ends unexpectedly

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.x(

Weaseal
January 31st, 2009, 22:49
:(# head bzip2recover
Script started on Sun Feb 1 05:50:18 2009
[root@/mnt/500-1]# bzip2recover usr.ar0s1f.dump-0.1.18.2009.bz2
bzip2recover 1.0.5: extracts blocks from damaged .bz2 files.
bzip2recover: searching for block boundaries ...
block 1 runs from 80 to 2014759
block 2 runs from 2014808 to 4801156
block 3 runs from 4801205 to 8167105
block 4 runs from 8167154 to 9949736
block 5 runs from 9949785 to 12383266
block 6 runs from 12383315 to 14804450And then...# tail bzip2recover
block 8294 runs from 777289756 to 784451678
block 8295 runs from 784451727 to 791559947
block 8296 runs from 791559996 to 798702126
block 8297 runs from 798702175 to 805860076
bzip2recover: I/O error reading `usr.ar0s1f.dump-0.1.18.2009.bz2', possible reason follows.
bzip2recover: No such file or directory
bzip2recover: warning: output file(s) may be incomplete.

graudeejs
January 31st, 2009, 23:56
Well, i think that's the answer

Weaseal
February 11th, 2009, 16:48
SOLVED.

There is a bug in 1 (or more) of the following FreeBSD items:
bzip2, fuse/ntfs driver, or the USB driver.

I was able to successfully use 7zip on Windows Vista to extract the .dump file from the .bz2, and transfer it via samba to the FreeBSD machine, and restore the disk.

First time Windows has ever done something right that FreeBSD couldn't!
First time for everything, I guess.

graudeejs
February 11th, 2009, 17:02
windows didn't do much.... all thanks should go to 7zip