[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
backup tape dump maps
Date: Thu, 2 Apr 1992 14:18 EST
From: gooch@tijeras.sw-sw.com (William D. Gooch)
Is there a way to (re)construct a backup tape dump map from the backup tape?
The problem is, if you lose your LMFS (as I did recently) and restore it
from backup, the dump-map for that backup is not included in the restored
set of files! Thus I will probably have to redump everything unless I can
rebuild the dump-map from the tapes.
The List Backup Tape command in FSMaint will show the contents of a dump
tape, but this probably isn't what you want because it's just file
names.
When you say "dump-map", are you referring to the file displayed by
Display Tape Map in FSMaint (a binary file named
>dump-maps>NAME.directory) or the .map file (a text file named
>dump-maps>TYPE-DATE-TIME.map)?
The dump tape includes most of the other information that's in the .map
file (everything but the file author, for some reason), and all of the information in the .directory file, but List Backup
Tape just doesn't print it. It shouldn't be difficult to modify it to
print all that information; get LMFS:RELOADER-SCAN-TAPE and find the
line
(format t "~&File ~A" (get story :file))
and modify it to print out the other information. STORY contains a
disembodied property list almost identical to what FS:FILE-PROPERTIES
returns.
Recreating the .directory file is a little trickier. The function
LMFS:WRITE-BACKUP-DUMP-HISTORY knows the file format. The first
argument is a list of (<keyword> <object> <creation-date>) triples; the
value of <object> depends on <keyword>, and the cases are:
:FILE or :DIRECTORY - <object> is a pathname
:FILE-STRINGS - <object> is a list of ("name" "type" version#)
:DIRECTORY-STRINGS - <object> is a directory namestring without the host prefix
<creation-date> is ignored for directories (I don't think it's on the
tape, either). So, what you'd need to do is modify
LMFS:RELOADER-SCAN-TAPE to collect the pathnames and creation dates into
a list and then call LMFS:WRITE-BACKUP-DUMP-HISTORY. The :PATHNAME
option allows you to specify a specific pathname to write to (it's
merged with #p"local:>dump-maps>.directory.newest") and :BOT-P specifies
whether you expect to be creating a new dump map file rather than
appending to an existing file. The other arguments have pretty obvious
meanings.
barmar