|
|
1.1 root 1: .TH RESTORE 8 "19 January 1983"
2: .UC 4
3: .SH NAME
4: restore \- incremental file system restore
5: .SH SYNOPSIS
6: .B /etc/restore
7: key [ name ... ]
8: .SH DESCRIPTION
9: .PP
10: .I Restore
11: reads tapes dumped with the
12: .IR dump (8)
13: command.
1.1.1.2 ! root 14: The block size on tape is stored
! 15: in the tape header by
! 16: .IR dump (8)
! 17: command and is used to correctly read the
! 18: remainder of the tape.
! 19: .PP
! 20: .I The
! 21: functions of
! 22: .IR restore
! 23: are controlled by the
1.1 root 24: .I key
25: argument.
26: The
27: .I key
28: is a string of characters containing
29: at most one function letter and possibly
30: one or more function modifiers.
31: Other arguments to the command are file or directory
32: names specifying the files that are to be restored.
33: Unless the
34: .B h
35: key is specified (see below),
36: the appearance of a directory name refers to
37: the files and (recursively) subdirectories of that directory.
38: .PP
39: The function portion of
40: the key is specified by one of the following letters:
41: .TP 5n
42: .B r
43: The tape
44: is read and loaded into the current directory.
45: This should not be done lightly; the
46: .B r
47: key should only be used to restore
48: a complete dump tape onto a clear file system
49: or to restore an incremental dump tape after a full level zero restore.
50: Thus
51: .IP "" 5n
52: /etc/newfs /dev/rfsd0c fsd
53: .br
54: /etc/mount /dev/fsd0c /usr
55: .br
56: cd /usr
57: .br
58: restore r
59: .IP "" 5n
60: is a typical sequence to restore a complete dump.
61: Another
62: .I restore
63: can be done to get an incremental dump
64: in on top of this.
65: Note that
66: .I restore
67: leaves a file
68: .I restoresymtab
69: in the root directory to pass information between incremental
70: restore passes.
71: This file should be removed when the last incremental tape has been
72: restored.
73: .br
74: A
75: .IR dump (8)
76: followed by a
77: .IR newfs (8)
78: and a
79: .I restore
80: is used to change the size of a file system.
81: .TP 5n
82: .B R
83: .I Restore
84: requests a particular tape of a multi volume set on which to restart
85: a full restore
86: (see the
87: .B r
88: key above).
89: This allows
90: .I restore
91: to be interrupted and then restarted.
92: .TP 5n
93: .B x
94: The named files are extracted from the tape.
95: If the named file matches a directory whose contents
96: had been written onto the tape,
97: and the
98: .B h
99: key is not specified,
100: the directory is recursively extracted.
101: The owner, modification time,
102: and mode are restored (if possible).
103: If no file argument is given,
104: then the root directory is extracted,
105: which results in the entire content of the
106: tape being extracted,
107: unless the
108: .B h
109: key has been specified.
110: .TP 5n
1.1.1.2 ! root 111: .B T
! 112: This option will give the date of the tape that was dumped.
! 113: .TP 5n
1.1 root 114: .B t
115: The names of the specified files are listed if they occur
116: on the tape.
117: If no file argument is given,
118: then the root directory is listed,
119: which results in the entire content of the
120: tape being listed,
121: unless the
122: .B h
123: key has been specified.
124: Note that the
125: .B t
126: key replaces the function of the old
127: .I dumpdir
128: program.
129: .TP 5n
130: .B i
131: This mode allows interactive restoration of files from a dump tape.
132: After reading in the directory information from the tape,
133: .I restore
134: provides a shell like interface that allows the user to move
135: around the directory tree selecting files to be extracted.
136: The available commands are given below;
137: for those commands that require an argument,
138: the default is the current directory.
139: .IP "" 10n
140: .ti -5n
141: .br
142: .B ls
143: [arg] \-
144: List the current or specified directory.
145: Entries that are directories are appended with a ``/''.
146: Entries that have been marked for extraction are prepended with a ``*''.
147: If the verbose key is set the inode number of each entry is also listed.
148: .ti -5n
149: .sp
150: .B cd
151: arg \-
152: Change the current working directory to the specified argument.
153: .ti -5n
154: .sp
155: .B pwd
156: \-
157: Print the full pathname of the current working directory.
158: .ti -5n
159: .sp
160: .B add
161: [arg] \-
162: The current directory or specified argument is added to the list of
163: files to be extracted.
164: If a directory is specified, then it and all its descendents are
165: added to the extraction list
166: (unless the
167: .B h
168: key is specified on the command line).
169: Files that are on the extraction list are prepended with a ``*''
170: when they are listed by
171: .BR ls .
172: .ti -5n
173: .sp
174: .B delete
175: [arg] \-
176: The current directory or specified argument is deleted from the list of
177: files to be extracted.
178: If a directory is specified, then it and all its descendents are
179: deleted from the extraction list
180: (unless the
181: .B h
182: key is specified on the command line).
183: The most expedient way to extract most of the files from a directory
184: is to add the directory to the extraction list and then delete
185: those files that are not needed.
186: .ti -5n
187: .sp
188: .B extract
189: \-
190: All the files that are on the extraction list are extracted
191: from the dump tape.
192: .I Restore
193: will ask which volume the user wishes to mount.
194: The fastest way to extract a few files is to
195: start with the last volume, and work towards the first volume.
196: .ti -5n
197: .sp
198: .B verbose
199: \-
200: The sense of the
201: .B v
202: key is toggled.
203: When set, the verbose key causes the
204: .B ls
205: command to list the inode numbers of all entries.
206: It also causes
207: .I restore
208: to print out information about each file as it is extracted.
209: .ti -5n
210: .sp
211: .B help
212: \-
213: List a summary of the available commands.
214: .ti -5n
215: .sp
216: .B quit
217: \-
218: Restore immediately exits,
219: even if the extraction list is not empty.
220: .sp
221: .PP
222: The following characters may be used in addition to the letter
223: that selects the function desired.
224: .TP 5n
225: .B v
226: Normally
227: .I restore
228: does its work silently.
229: The
230: .B v
231: (verbose)
232: key causes it to type the name of each file it treats
233: preceded by its file type.
234: .TP 5n
235: .B f
236: The next argument to
237: .I restore
238: is used as the name of the archive instead
239: of /dev/rcy?.
240: If the name of the file is ``\-'',
241: .I restore
242: reads from standard input.
243: Thus,
244: .IR dump (8)
245: and
246: .I restore
247: can be used in a pipeline to dump and restore a file system
248: with the command
249: .IP "" 5n
250: dump 0f - /usr | (cd /mnt; restore xf -)
251: .TP 5n
252: .B y
253: .I Restore
254: will not ask whether it should abort the restore if gets a tape error.
255: It will always try to skip over the bad tape block(s) and continue as
256: best it can.
257: .TP 5n
258: .B m
259: .I Restore
260: will extract by inode numbers rather than by file name.
261: This is useful if only a few files are being extracted,
262: and one wants to avoid regenerating the complete pathname
263: to the file.
264: .TP 5n
265: .B h
266: .I Restore
267: extracts the actual directory,
268: rather than the files that it references.
269: This prevents hierarchical restoration of complete subtrees
270: from the tape.
271: .SH DIAGNOSTICS
272: Complaints about bad key characters.
273: .PP
274: Complaints if it gets a read error.
275: If
276: .B y
277: has been specified, or the user responds ``y'',
278: .I restore
279: will attempt to continue the restore.
280: .PP
281: If the dump extends over more than one tape,
282: .I restore
283: will ask the user to change tapes.
284: If the
285: .B x
286: or
287: .B i
288: key has been specified,
289: .I restore
290: will also ask which volume the user wishes to mount.
291: The fastest way to extract a few files is to
292: start with the last volume, and work towards the first volume.
293: .PP
294: There are numerous consistency checks that can be listed by
295: .IR restore .
296: Most checks are self-explanatory or can ``never happen''.
297: Common errors are given below.
298: .IP "Converting to new file system format." 5n
299: .br
300: A dump tape created from the old file system has been loaded.
301: It is automatically converted to the new file system format.
302: .IP "<filename>: not found on tape" 5n
303: .br
304: The specified file name was listed in the tape directory,
305: but was not found on the tape.
306: This is caused by tape read errors while looking for the file,
307: and from using a dump tape created on an active file system.
308: .IP "expected next file <inumber>, got <inumber>" 5n
309: .br
310: A file that was not listed in the directory showed up.
311: This can occur when using a dump tape created on an active file system.
312: .IP "Incremental tape too low" 5n
313: .br
314: When doing incremental restore,
315: a tape that was written before the previous incremental tape,
316: or that has too low an incremental level has been loaded.
317: .IP "Incremental tape too high" 5n
318: .br
319: When doing incremental restore,
320: a tape that does not begin its coverage where the previous incremental
321: tape left off,
322: or that has too high an incremental level has been loaded.
323: .IP "Tape read error while restoring <filename>" 5n
324: .ti -5n
325: .br
326: Tape read error while skipping over inode <inumber>
327: .ti -5n
328: .br
329: Tape read error while trying to resynchronize
330: .br
331: A tape read error has occurred.
332: If a file name is specified,
333: then its contents are probably partially wrong.
334: If an inode is being skipped or the tape is trying to resynchronize,
335: then no extracted files have been corrupted,
336: though files may not be found on the tape.
337: .IP "resync restore, skipped <num> blocks" 5n
338: .br
339: After a tape read error,
340: .I restore
341: may have to resynchronize itself.
342: This message lists the number of blocks that were skipped over.
343: .SH FILES
344: /dev/rcy? the default tape drive
345: .br
346: /tmp/rstdir* file containing directories on the tape.
347: .br
348: /tmp/rstmode* owner, mode, and time stamps for directories.
349: .br
350: \&./restoresymtab information passed between incremental restores.
351: .SH SEE ALSO
352: rrestore(8C), dump(8), newfs(8), mount(8), mkfs(8)
353: .SH BUGS
354: .I Restore
355: can get confused when doing incremental restores from
356: dump tapes that were made on active file systems.
357: .PP
358: A level zero dump must be done after a full restore.
359: Because restore runs in user code,
360: it has no control over inode allocation;
361: thus a full restore must be done to get a new set of directories
362: reflecting the new inode numbering,
363: even though the contents of the files is unchanged.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.