Restore reads tapes dumped with the dump(8) command. Its actions are controlled by the key argument. The key is a string of characters containing at most one function letter and possibly one or more function modifiers. Other arguments to the command are file or directory names specifying the files that are to be restored. Unless the h key is specified (see below), the appearance of a directory name refers to the files and (recursively) subdirectories of that directory.
The function portion of the key is specified by one of the following letters:
cd
arg -
Change the current working directory to the specified argument.
pwd
-
Print the full pathname of the current working directory.
add
[arg] -
The current directory or specified argument is added to the list of
files to be extracted.
If a directory is specified, then it and all its descendents are
added to the extraction list
(unless the
h
key is specified on the command line).
Files that are on the extraction list are prepended with a ``*''
when they are listed by
ls.
delete
[arg] -
The current directory or specified argument is deleted from the list of
files to be extracted.
If a directory is specified, then it and all its descendents are
deleted from the extraction list
(unless the
h
key is specified on the command line).
The most expedient way to extract most of the files from a directory
is to add the directory to the extraction list and then delete
those files that are not needed.
extract
-
All the files that are on the extraction list are extracted
from the dump tape.
Restore
will ask which volume the user wishes to mount.
The fastest way to extract a few files is to
start with the last volume, and work towards the first volume.
setmodes
-
All the directories that have been added to the extraction list
have their owner, modes, and times set;
nothing is extracted from the tape.
This is useful for cleaning up after a restore has been prematurely aborted.
verbose
-
The sense of the
v
key is toggled.
When set, the verbose key causes the
ls
command to list the inode numbers of all entries.
It also causes
restore
to print out information about each file as it is extracted.
help
-
List a summary of the available commands.
quit - Restore immediately exits, even if the extraction list is not empty.
The following characters may be used in addition to the letter that selects the function desired.
Complaints if it gets a read error. If y has been specified, or the user responds ``y'', restore will attempt to continue the restore.
If the dump extends over more than one tape, restore will ask the user to change tapes. If the x or i key has been specified, restore will also ask which volume the user wishes to mount. The fastest way to extract a few files is to start with the last volume, and work towards the first volume.
There are numerous consistency checks that can be listed by restore. Most checks are self-explanatory or can ``never happen''. Common errors are given below.
A level zero dump must be done after a full restore. Because restore runs in user code, it has no control over inode allocation; thus a full restore must be done to get a new set of directories reflecting the new inode numbering, even though the contents of the files is unchanged.