Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!udel!sbcs.sunysb.edu!stark.UUCP!gene From: gene@stark.uucp (Gene Stark) Newsgroups: comp.os.386bsd.bugs Subject: Bug in /sbin/restore (PATCH) Date: 23 Mar 93 22:35:38 Organization: Gene Stark's home system Lines: 46 Distribution: world Message-ID: <GENE.93Mar23223538@stark.stark.uucp> NNTP-Posting-Host: stark.uucp Cc: gene After nearly trashing my filesystem with a hastily installed kernel "experiment", I reached for my level 0 dump so that I could reinstall my garbled INN installation. Oops, restore didn't seem to understand that /usr/libexec/inn once was a directory on my system. In fact, only about half the directories seemed to have made it to my dump unadulterated. But wait! The interactive restore was terminating the directory extraction early, immediately after beginning to read volume 2. After several hours of head bashing, I found the answer: restore does not work properly if the records for directories span more than one volume. Here's the patch that allowed me to restore my stuff. I imagine it should somehow be directed to an official BSD patch collector (if this hasn't been spotted already), but I don't know who that might be. Please, no flames about the fact that I had made and was trying to restore from a 96 floppy dump! - Gene Stark *** /usr/src/sbin/restore/tape.c.orig Tue Apr 16 20:30:40 1991 --- /usr/src/sbin/restore/tape.c Tue Mar 23 22:23:36 1993 *************** *** 358,363 **** --- 358,375 ---- if (curfile.action == USING) { if (volno == 1) panic("active file into volume 1\n"); + /* + * Skip over the dump tape header + */ + if (tmpbuf.c_type == TS_TAPE && (tmpbuf.c_flags & DR_NEWHEADER)) + for(i = tmpbuf.c_count+1; i > 0; i--) + readtape(&tmpbuf); + /* + * Skip over the inode map + */ + if(tmpbuf.c_type == TS_BITS) + for(i = tmpbuf.c_count; i > 0; i--) + readtape(&tmpbuf); return; } /* -- stark@cs.sunysb.edu