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