]>
Commit | Line | Data |
---|---|---|
1227625a SP |
1 | .\" Copyright (c) 1985, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
4bb009da | 32 | .\" $Id: restore.8.in,v 1.29 2002/11/19 13:39:36 stelian Exp $ |
1227625a | 33 | .\" |
153f9a83 SP |
34 | .TH RESTORE 8 "version __VERSION__ of __DATE__" BSD "System management commands" |
35 | .SH NAME | |
36 | restore \- restore files or file systems from backups made with dump | |
37 | .SH SYNOPSIS | |
38 | .B restore \-C | |
39 | [\fB\-cdklMvVy\fR] | |
40 | [\fB\-b \fIblocksize\fR] | |
41 | [\fB\-D \fIfilesystem\fR] | |
42 | [\fB\-f \fIfile\fR] | |
43 | [\fB\-F \fIscript\fR] | |
44 | [\fB\-L \fIlimit\fR] | |
45 | [\fB\-s \fIfileno\fR] | |
46 | [\fB\-T \fIdirectory\fR] | |
47 | .PP | |
48 | .B restore \-i | |
49 | [\fB\-acdhklmMNouvVy\fR] | |
50 | [\fB\-A \fIfile\fR] | |
51 | [\fB\-b \fIblocksize\fR] | |
52 | [\fB\-f \fIfile\fR] | |
53 | [\fB\-F \fIscript\fR] | |
54 | [\fB\-Q \fIfile\fR] | |
55 | [\fB\-s \fIfileno\fR] | |
56 | [\fB\-T \fIdirectory\fR] | |
57 | .PP | |
58 | .B restore \-P | |
59 | .I file | |
60 | [\fB\-acdhklmMNuvVy\fR] | |
61 | [\fB\-A \fIfile\fR] | |
62 | [\fB\-b \fIblocksize\fR] | |
63 | [\fB\-f \fIfile\fR] | |
64 | [\fB\-F \fIscript\fR] | |
65 | [\fB\-s \fIfileno\fR] | |
66 | [\fB\-T \fIdirectory\fR] | |
67 | [\fB\-X \fIfilelist\fR] | |
68 | [ \fIfile ... \fR] | |
69 | .PP | |
70 | .B restore \-R | |
71 | [\fB\-cdklMNuvVy\fR] | |
72 | [\fB\-b \fIblocksize\fR] | |
73 | [\fB\-f \fIfile\fR] | |
74 | [\fB\-F \fIscript\fR] | |
75 | [\fB\-s \fIfileno\fR] | |
76 | [\fB\-T \fIdirectory\fR] | |
77 | .PP | |
78 | .B restore \-r | |
79 | [\fB\-cdklMNuvVy\fR] | |
80 | [\fB\-b \fIblocksize\fR] | |
81 | [\fB\-f \fIfile\fR] | |
82 | [\fB\-F \fIscript\fR] | |
83 | [\fB\-s \fIfileno\fR] | |
84 | [\fB\-T \fIdirectory\fR] | |
85 | .PP | |
86 | .B restore \-t | |
87 | [\fB\-cdhklMNuvVy\fR] | |
88 | [\fB\-A \fIfile\fR] | |
89 | [\fB\-b \fIblocksize\fR] | |
90 | [\fB\-f \fIfile\fR] | |
91 | [\fB\-F \fIscript\fR] | |
92 | [\fB\-Q \fIfile\fR] | |
93 | [\fB\-s \fIfileno\fR] | |
94 | [\fB\-T \fIdirectory\fR] | |
95 | [\fB\-X \fIfilelist\fR] | |
96 | [ \fIfile ... \fR] | |
97 | .PP | |
98 | .B restore \-x | |
99 | [\fB\-adchklmMNouvVy\fR] | |
100 | [\fB\-A \fIfile\fR] | |
101 | [\fB\-b \fIblocksize\fR] | |
102 | [\fB\-f \fIfile\fR] | |
103 | [\fB\-F \fIscript\fR] | |
104 | [\fB\-Q \fIfile\fR] | |
105 | [\fB\-s \fIfileno\fR] | |
106 | [\fB\-T \fIdirectory\fR] | |
107 | [\fB\-X \fIfilelist\fR] | |
108 | [ \fIfile ... \fR] | |
109 | .PP | |
110 | (The 4.3BSD option syntax is implemented for backward compatibility but is not | |
111 | documented here.) | |
112 | .SH DESCRIPTION | |
1227625a | 113 | The |
153f9a83 | 114 | .B restore |
1227625a | 115 | command performs the inverse function of |
153f9a83 SP |
116 | .BR dump (8). |
117 | A full backup of a file system may be restored and subsequent incremental | |
118 | backups layered on top of it. Single files and directory subtrees may be | |
119 | restored from full or partial backups. | |
120 | .B Restore | |
121 | works across a network; to do this see the | |
122 | .B \-f | |
123 | flag described below. Other arguments to the command are file or directory | |
124 | names specifying the files that are to be restored. Unless the | |
125 | .B \-h | |
126 | flag is specified (see below), the appearance of a directory name refers to | |
1227625a | 127 | the files and (recursively) subdirectories of that directory. |
153f9a83 | 128 | .PP |
1227625a | 129 | Exactly one of the following flags is required: |
153f9a83 SP |
130 | .TP |
131 | .B \-C | |
1227625a | 132 | This mode allows comparison of files from a dump. |
153f9a83 SP |
133 | .B Restore |
134 | reads the backup and compares its contents with files present on the disk. It | |
135 | first changes its working directory to the root of the filesystem that was | |
136 | dumped and compares the tape with the files in its new current directory. See | |
137 | also the | |
138 | .B \-L | |
05f23c0c | 139 | flag described below. |
153f9a83 SP |
140 | .TP |
141 | .B \-i | |
142 | This mode allows interactive restoration of files from a dump. After reading in | |
143 | the directory information from the dump, | |
144 | .B restore | |
145 | provides a shell like interface that allows the user to move around the | |
146 | directory tree selecting files to be extracted. The available commands are | |
147 | given below; for those commands that require an argument, the default is the | |
148 | current directory. | |
149 | .RS | |
150 | .TP | |
151 | .B add \fR[\fIarg\fR] | |
152 | The current directory or specified argument is added to the list of files to be | |
153 | extracted. If a directory is specified, then it and all its descendents are | |
154 | added to the extraction list (unless the | |
155 | .B \-h | |
156 | flag is specified on the command line). Files that are on the extraction list | |
157 | are prepended with a \*(lq*\*(rq when they are listed by | |
158 | .BR ls . | |
159 | .TP | |
160 | .BI cd " arg" | |
1227625a | 161 | Change the current working directory to the specified argument. |
153f9a83 SP |
162 | .TP |
163 | .B delete \fR[\fIarg\fR] | |
164 | The current directory or specified argument is deleted from the list of files | |
165 | to be extracted. If a directory is specified, then it and all its descendents | |
166 | are deleted from the extraction list (unless the | |
167 | .B \-h | |
168 | flag is specified on the command line). The most expedient way to extract most | |
169 | of the files from a directory is to add the directory to the extraction list | |
170 | and then delete those files that are not needed. | |
171 | .TP | |
172 | .B extract | |
173 | All files on the extraction list are extracted from the dump. | |
174 | .B Restore | |
175 | will ask which volume the user wishes to mount. The fastest way to extract a f | |
176 | ew files is to start with the last volume and work towards the first volume. | |
177 | .TP | |
178 | .B help | |
1227625a | 179 | List a summary of the available commands. |
153f9a83 SP |
180 | .TP |
181 | .B ls \fR[\fIarg\fR] | |
182 | List the current or specified directory. Entries that are directories are | |
183 | appended with a \*(lq/\*(rq. Entries that have been marked for extraction are | |
184 | prepended with a \*(lq*\*(rq. If the verbose flag is set, the inode number of | |
185 | each entry is also listed. | |
186 | .TP | |
187 | .B pwd | |
1227625a | 188 | Print the full pathname of the current working directory. |
153f9a83 SP |
189 | .TP |
190 | .B quit | |
191 | .B Restore | |
192 | immediately exits, even if the extraction list is not empty. | |
193 | .TP | |
194 | .B setmodes | |
195 | All directories that have been added to the extraction list have their owner, | |
196 | modes, and times set; nothing is extracted from the dump. This is useful for | |
197 | cleaning up after a | |
198 | .B restore | |
199 | has been prematurely aborted. | |
200 | .TP | |
201 | .B verbose | |
1227625a | 202 | The sense of the |
153f9a83 SP |
203 | .B \-v |
204 | flag is toggled. When set, the verbose flag causes the | |
205 | .B ls | |
206 | command to list the inode numbers of all entries. It also causes | |
207 | .B restore | |
1227625a | 208 | to print out information about each file as it is extracted. |
153f9a83 SP |
209 | .RE |
210 | .TP | |
211 | .BI \-P " file" | |
212 | .B Restore | |
fe0e0285 | 213 | creates a new Quick File Access file |
153f9a83 | 214 | .I file |
fe0e0285 | 215 | from an existing dump file without restoring its contents. |
153f9a83 SP |
216 | .TP |
217 | .B \-R | |
218 | .B Restore | |
219 | requests a particular tape of a multi-volume set on which to restart a full | |
220 | restore (see the | |
221 | .B \-r | |
222 | flag below). This is useful if the restore has been interrupted. | |
223 | .TP | |
224 | .B \-r | |
225 | Restore (rebuild) a file system. The target file system should be made pristine | |
226 | with | |
227 | .BR mke2fs (8), | |
ddd2ef55 | 228 | mounted, and the user |
153f9a83 SP |
229 | .BR cd 'd |
230 | into the pristine file system before starting the restoration of the initial | |
231 | level 0 backup. If the level 0 restores successfully, the | |
232 | .B \-r | |
233 | flag may be used to restore any necessary incremental backups on top of the | |
234 | level 0. The | |
235 | .B \-r | |
236 | flag precludes an interactive file extraction and can be detrimental to one's | |
237 | health (not to mention the disk) if not used carefully. An example: | |
238 | .IP | |
239 | .RS 14 | |
240 | .B mke2fs /dev/sda1 | |
241 | .TP | |
242 | .B mount /dev/sda1 /mnt | |
243 | .TP | |
244 | .B cd /mnt | |
245 | .TP | |
246 | .B restore rf /dev/st0 | |
247 | .RE | |
248 | .IP | |
1227625a | 249 | Note that |
153f9a83 | 250 | .B restore |
1227625a | 251 | leaves a file |
153f9a83 SP |
252 | .I restoresymtable |
253 | in the root directory to pass information between incremental restore passes. | |
254 | This file should be removed when the last incremental has been restored. | |
255 | .IP | |
256 | .BR Restore , | |
1227625a | 257 | in conjunction with |
153f9a83 | 258 | .BR mke2fs (8) |
1227625a | 259 | and |
153f9a83 SP |
260 | .BR dump (8), |
261 | may be used to modify file system parameters such as size or block size. | |
262 | .TP | |
263 | .B \-t | |
264 | The names of the specified files are listed if they occur on the backup. If no | |
265 | file argument is given, the root directory is listed, which results in the | |
266 | entire content of the backup being listed, unless the | |
267 | .B \-h | |
268 | flag has been specified. Note that the | |
269 | .B \-t | |
1227625a | 270 | flag replaces the function of the old |
153f9a83 SP |
271 | .BR dumpdir (8) |
272 | program. See also the | |
273 | .B \-X | |
08db2b86 | 274 | option below. |
153f9a83 SP |
275 | .TP |
276 | .B \-x | |
277 | The named files are read from the given media. If a named file matches a | |
278 | directory whose contents are on the backup and the | |
279 | .B \-h | |
280 | flag is not specified, the directory is recursively extracted. The owner, | |
281 | modification time, and mode are restored (if possible). If no file argument is | |
282 | given, the root directory is extracted, which results in the entire content of | |
283 | the backup being extracted, unless the | |
284 | .B \-h | |
285 | flag has been specified. See also the | |
286 | .B \-X | |
08db2b86 | 287 | option below. |
153f9a83 | 288 | .SH OPTIONS |
1227625a | 289 | The following additional options may be specified: |
153f9a83 SP |
290 | .TP |
291 | .B \-a | |
40df6a0e | 292 | In |
153f9a83 | 293 | .B \-i |
40df6a0e | 294 | or |
153f9a83 | 295 | .B \-x |
40df6a0e | 296 | mode, |
153f9a83 SP |
297 | .B restore |
298 | does ask the user for the volume number on which the files to be extracted are | |
299 | supposed to be (in order to minimise the time by reading only the interesting | |
300 | volumes). The | |
301 | .B \-a | |
302 | option disables this behaviour and reads all the volumes starting with 1. This | |
303 | option is useful when the operator does not know on which volume the files to | |
304 | be extracted are and/or when he prefers the longer unattended mode rather than | |
305 | the shorter interactive mode. | |
306 | .TP | |
307 | .BI \-A " archive_file" | |
e51470bf | 308 | Read the table of contents from |
153f9a83 | 309 | .I archive_file |
e51470bf | 310 | instead of the media. This option can be used in combination with the |
153f9a83 SP |
311 | .BR \-t , |
312 | .BR \-i , | |
e51470bf | 313 | or |
153f9a83 SP |
314 | .B \-x |
315 | options, making it possible to check whether files are on the media without | |
316 | having to mount the media. | |
317 | .TP | |
318 | .BI \-b " blocksize" | |
319 | The number of kilobytes per dump record. If the | |
320 | .B \-b | |
1227625a | 321 | option is not specified, |
153f9a83 | 322 | .B restore |
b45f51d6 | 323 | tries to determine the media block size dynamically. |
153f9a83 SP |
324 | .TP |
325 | .B \-c | |
1227625a | 326 | Normally, |
153f9a83 SP |
327 | .B restore |
328 | will try to determine dynamically whether the dump was made from an old | |
329 | (pre-4.4) or new format file system. The | |
330 | .B \-c | |
331 | flag disables this check, and only allows reading a dump in the old format. | |
332 | .TP | |
333 | .B \-d | |
fceb4f25 | 334 | The |
153f9a83 SP |
335 | .B \-d |
336 | (debug) flag causes | |
337 | .B restore | |
fceb4f25 | 338 | to print debug information. |
153f9a83 SP |
339 | .TP |
340 | .BI \-D " filesystem" | |
1227625a | 341 | The |
153f9a83 | 342 | .B \-D |
1227625a | 343 | flag allows the user to specify the filesystem name when using |
153f9a83 | 344 | .B restore |
1227625a | 345 | with the |
153f9a83 | 346 | .B \-C |
1227625a | 347 | option to check the backup. |
153f9a83 SP |
348 | .TP |
349 | .BI \-f " file" | |
1227625a | 350 | Read the backup from |
153f9a83 SP |
351 | .IR file ; |
352 | .I file | |
353 | may be a special device file like | |
354 | .I /dev/st0 | |
1227625a | 355 | (a tape drive), |
153f9a83 SP |
356 | .I /dev/sda1 |
357 | (a disk drive), an ordinary file, or | |
358 | .I \- | |
359 | (the standard input). If the name of the file is of the form | |
360 | .I host:file | |
1227625a | 361 | or |
153f9a83 SP |
362 | .IR user@host:file , |
363 | .B restore | |
1227625a | 364 | reads from the named file on the remote host using |
153f9a83 SP |
365 | .BR rmt (8). |
366 | .TP | |
367 | .BI \-F " script" | |
368 | Run script at the beginning of each tape. The device name and the current | |
369 | volume number are passed on the command line. The script must return 0 if | |
370 | .B restore | |
c534413c | 371 | should continue without asking the user to change the tape, 1 if |
153f9a83 SP |
372 | .B restore |
373 | should continue but ask the user to change the tape. Any other exit code will | |
374 | cause | |
375 | .B restore | |
376 | to abort. For security reasons, | |
377 | .B restore | |
378 | reverts back to the real user ID and the real group ID before running the | |
379 | script. | |
380 | .TP | |
381 | .B \-h | |
382 | Extract the actual directory, rather than the files that it references. This | |
383 | prevents hierarchical restoration of complete subtrees from the dump. | |
384 | .TP | |
385 | .B \-k | |
386 | Use Kerberos authentication when contacting the remote tape server. (Only | |
387 | available if this options was enabled when | |
388 | .B restore | |
e51470bf | 389 | was compiled.) |
153f9a83 SP |
390 | .TP |
391 | .B \-l | |
392 | When doing remote restores, assume the remote file is a regular file (instead | |
393 | of a tape device). If you're restoring a remote compressed file, you will need | |
394 | to specify this option or | |
395 | .B restore | |
80dea635 | 396 | will fail to access it correctly. |
153f9a83 SP |
397 | .TP |
398 | .BI \-L " limit" | |
05f23c0c | 399 | The |
153f9a83 SP |
400 | .B \-L |
401 | flag allows the user to specify a maximal number of miscompares when using | |
402 | .B restore | |
05f23c0c | 403 | with the |
153f9a83 | 404 | .B \-C |
05f23c0c | 405 | option to check the backup. If this limit is reached, |
153f9a83 SP |
406 | .B restore |
407 | will abort with an error message. A value of 0 (the default value) disables | |
408 | the check. | |
409 | .TP | |
410 | .B \-m | |
411 | Extract by inode numbers rather than by file name. This is useful if only a few | |
412 | files are being extracted, and one wants to avoid regenerating the complete | |
413 | pathname to the file. | |
414 | .TP | |
415 | .B \-M | |
416 | Enables the multi-volume feature (for reading dumps made using the | |
417 | .B \-M | |
dc7cb1e2 | 418 | option of dump). The name specified with |
153f9a83 | 419 | .B \-f |
dc7cb1e2 | 420 | is treated as a prefix and |
153f9a83 SP |
421 | .B restore |
422 | tries to read in sequence from | |
423 | .I <prefix>001, <prefix>002 | |
424 | etc. | |
425 | .TP | |
426 | .B \-N | |
1227625a | 427 | The |
153f9a83 | 428 | .B \-N |
1227625a | 429 | flag causes |
153f9a83 | 430 | .B restore |
05f23c0c | 431 | to perform a full execution as requested by one of |
153f9a83 SP |
432 | .BR \-i , |
433 | .BR \-R , | |
434 | .BR \-r , | |
435 | .B t | |
05f23c0c | 436 | or |
153f9a83 | 437 | .B x |
05f23c0c | 438 | command without actually writing any file on disk. |
153f9a83 SP |
439 | .TP |
440 | .B \-o | |
80784c73 | 441 | The |
153f9a83 | 442 | .B \-o |
80784c73 | 443 | flag causes |
153f9a83 SP |
444 | .B restore |
445 | to automatically restore the current directory permissions without asking the | |
446 | operator whether to do so in one of | |
447 | .B \-i | |
80784c73 | 448 | or |
153f9a83 | 449 | .B \-x |
80784c73 | 450 | modes. |
153f9a83 SP |
451 | .TP |
452 | .BI \-Q " file" | |
35b24fb7 | 453 | Use the file |
153f9a83 SP |
454 | .I file |
455 | in order to read tape position as stored using the dump Quick File Access mode, | |
456 | in one of | |
457 | .BR \-i , | |
458 | .B \-x | |
e51470bf | 459 | or |
153f9a83 | 460 | .B \-t |
e51470bf | 461 | mode. |
153f9a83 SP |
462 | .IP |
463 | It is recommended to set up the st driver to return logical tape positions | |
464 | rather than physical before calling | |
465 | .B dump/restore | |
466 | with parameter | |
467 | .BR \-Q . | |
468 | Since not all tape devices support physical tape positions those tape devices | |
469 | return an error during | |
470 | .B dump/restore | |
471 | when the st driver is set to the default physical setting. Please see the | |
472 | .BR st (4) | |
473 | man page, option | |
474 | .B MTSETDRVBUFFER | |
475 | , or the | |
476 | .BR mt(1) | |
477 | man page, on how to set the driver to return logical tape positions. | |
478 | .IP | |
479 | Before calling | |
480 | .B restore | |
481 | with parameter | |
482 | .BR \-Q , | |
483 | always make sure the st driver is set to return the same type of tape position | |
484 | used during the call to | |
485 | .BR dump . | |
486 | Otherwise | |
487 | .B restore | |
488 | may be confused. | |
489 | .IP | |
490 | This option can be used when restoring from local or remote tapes (see above) | |
491 | or from local or remote files. | |
492 | .TP | |
493 | .BI \-s " fileno" | |
1227625a | 494 | Read from the specified |
153f9a83 SP |
495 | .I fileno |
496 | on a multi-file tape. File numbering starts at 1. | |
497 | .TP | |
498 | .BI \-T " directory" | |
1227625a | 499 | The |
153f9a83 SP |
500 | .B \-T |
501 | flag allows the user to specify a directory to use for the storage of temporary | |
502 | files. The default value is | |
503 | .IR /tmp . | |
504 | This flag is most useful when restoring files after having booted from a | |
505 | floppy. There might be little or no space on the floppy filesystem, but another | |
506 | source of space might exist. | |
507 | .TP | |
508 | .B \-u | |
509 | When creating certain types of files, | |
510 | .B restore | |
511 | may generate a warning diagnostic if they already exist in the target | |
512 | directory. To prevent this, the | |
513 | .B \-u | |
514 | (unlink) flag causes | |
515 | .B restore | |
516 | to remove old entries before attempting to create new ones. | |
517 | .TP | |
518 | .B \-v | |
1227625a | 519 | Normally |
153f9a83 SP |
520 | .B restore |
521 | does its work silently. The | |
522 | .B \-v | |
523 | (verbose) flag causes it to type the name of each file it treats preceded by | |
524 | its file type. | |
525 | .TP | |
526 | .B \-V | |
8b7882a8 | 527 | Enables reading multi-volume non-tape mediums like CDROMs. |
153f9a83 SP |
528 | .TP |
529 | .BI \-X " filelist" | |
1a05d45d | 530 | Read list of files to be listed or extracted from the text file |
153f9a83 | 531 | .I filelist |
1a05d45d | 532 | in addition to those specified on the command line. This can be used in |
08db2b86 | 533 | conjunction with the |
153f9a83 | 534 | .B \-t |
08db2b86 | 535 | or |
153f9a83 | 536 | .B \-x |
08db2b86 | 537 | commands. The file |
153f9a83 | 538 | .I filelist |
08db2b86 | 539 | should contain file names separated by newlines. |
153f9a83 | 540 | .I filelist |
1a05d45d | 541 | may be an ordinary file or |
153f9a83 | 542 | .I - |
1a05d45d | 543 | (the standard input). |
153f9a83 SP |
544 | .TP |
545 | .B \-y | |
1227625a SP |
546 | Do not ask the user whether to abort the restore in the event of an error. |
547 | Always try to skip over the bad block(s) and continue. | |
153f9a83 SP |
548 | .SH DIAGNOSTICS |
549 | Complains if it gets a read error. If | |
550 | .B y | |
1227625a | 551 | has been specified, or the user responds |
153f9a83 SP |
552 | .BR y , |
553 | .B restore | |
1227625a | 554 | will attempt to continue the restore. |
153f9a83 | 555 | .PP |
1227625a | 556 | If a backup was made using more than one tape volume, |
153f9a83 SP |
557 | .B restore |
558 | will notify the user when it is time to mount the next volume. If the | |
559 | .B \-x | |
1227625a | 560 | or |
153f9a83 | 561 | .B \-i |
1227625a | 562 | flag has been specified, |
153f9a83 SP |
563 | .B restore |
564 | will also ask which volume the user wishes to mount. The fastest way to extract | |
565 | a few files is to start with the last volume, and work towards the first volume. | |
566 | .PP | |
1227625a | 567 | There are numerous consistency checks that can be listed by |
153f9a83 SP |
568 | .BR restore . |
569 | Most checks are self-explanatory or can \*(lqnever happen\*(rq. Common errors | |
570 | are given below: | |
571 | .TP | |
572 | .I Converting to new file system format | |
573 | A dump tape created from the old file system has been loaded. It is | |
574 | automatically converted to the new file system format. | |
575 | .TP | |
576 | .I <filename>: not found on tape | |
577 | The specified file name was listed in the tape directory, but was not found on | |
578 | the tape. This is caused by tape read errors while looking for the file, and | |
579 | from using a dump tape created on an active file system. | |
580 | .TP | |
581 | .I expected next file <inumber>, got <inumber> | |
582 | A file that was not listed in the directory showed up. This can occur when | |
583 | using a dump created on an active file system. | |
584 | .TP | |
585 | .I Incremental dump too low | |
586 | When doing an incremental restore, a dump that was written before the previous | |
587 | incremental dump, or that has too low an incremental level has been loaded. | |
588 | .TP | |
589 | .I Incremental dump too high | |
590 | When doing an incremental restore, a dump that does not begin its coverage | |
591 | where the previous incremental dump left off, or that has too high an | |
592 | incremental level has been loaded. | |
593 | .TP | |
594 | .I Tape read error while restoring <filename> | |
595 | .TP | |
596 | .I Tape read error while skipping over inode <inumber> | |
597 | .TP | |
598 | .I Tape read error while trying to resynchronize | |
599 | A tape (or other media) read error has occurred. If a file name is specified, | |
600 | its contents are probably partially wrong. If an inode is being skipped or the | |
601 | tape is trying to resynchronize, no extracted files have been corrupted, though | |
602 | files may not be found on the tape. | |
603 | .TP | |
604 | .I resync restore, skipped <num> blocks | |
1227625a | 605 | After a dump read error, |
153f9a83 SP |
606 | .B restore |
607 | may have to resynchronize itself. This message lists the number of blocks that | |
608 | were skipped over. | |
609 | .SH EXIT STATUS | |
610 | .B Restore | |
611 | exits with zero status on success. Tape errors are indicated with an exit code | |
612 | of 1. | |
613 | .PP | |
614 | When doing a comparison of files from a dump, an exit code of 2 indicates that | |
615 | some files were modified or deleted since the dump was made. | |
616 | .SH ENVIRONMENT | |
ddd2ef55 | 617 | If the following environment variable exists it will be utilized by |
153f9a83 SP |
618 | .BR restore : |
619 | .TP | |
620 | .B TAPE | |
621 | If no | |
622 | .B \-f | |
623 | option was specified, | |
624 | .B restore | |
b45f51d6 | 625 | will use the device specified via |
153f9a83 | 626 | .B TAPE |
b45f51d6 | 627 | as the dump device. |
153f9a83 | 628 | .B TAPE |
b45f51d6 | 629 | may be of the form |
153f9a83 SP |
630 | .IR tapename , |
631 | .I host:tapename | |
b45f51d6 | 632 | or |
153f9a83 SP |
633 | .IR user@host:tapename . |
634 | .TP | |
635 | .B TMPDIR | |
ddd2ef55 | 636 | The directory given in |
153f9a83 SP |
637 | .B TMPDIR |
638 | will be used instead of | |
639 | .I /tmp | |
ddd2ef55 | 640 | to store temporary files. |
153f9a83 SP |
641 | .TP |
642 | .B RMT | |
b45f51d6 | 643 | The environment variable |
153f9a83 | 644 | .B RMT |
b45f51d6 | 645 | will be used to determine the pathname of the remote |
153f9a83 | 646 | .BR rmt (8) |
b45f51d6 | 647 | program. |
153f9a83 SP |
648 | .TP |
649 | .B RSH | |
650 | .B Restore | |
651 | uses the contents of this variable to determine the name of the remote shell | |
652 | command to use when doing a network restore (rsh, ssh etc.). If this variable | |
653 | is not set, | |
654 | .BR rcmd (3) | |
0c62667d | 655 | will be used, but only root will be able to do a network restore. |
153f9a83 SP |
656 | .SH FILES |
657 | .TP | |
658 | .I /dev/st0 | |
1227625a | 659 | the default tape drive |
153f9a83 SP |
660 | .TP |
661 | .I /tmp/rstdir* | |
ddd2ef55 | 662 | file containing directories on the tape |
153f9a83 SP |
663 | .TP |
664 | .I /tmp/rstmode* | |
ddd2ef55 | 665 | owner, mode, and time stamps for directories |
153f9a83 SP |
666 | .TP |
667 | .I ./restoresymtable | |
ddd2ef55 | 668 | information passed between incremental restores |
153f9a83 SP |
669 | .SH SEE ALSO |
670 | .BR dump (8), | |
671 | .BR mount (8), | |
672 | .BR mke2fs (8), | |
673 | .BR rmt (8) | |
674 | .SH BUGS | |
675 | .B Restore | |
676 | can get confused when doing incremental restores from dumps that were made on | |
677 | active file systems. | |
678 | .PP | |
679 | A level 0 dump must be done after a full restore. Because | |
680 | .B restore | |
681 | runs in user code, it has no control over inode allocation; thus a full dump | |
682 | must be done to get a new set of directories reflecting the new inode | |
683 | numbering, even though the content of the files is unchanged. | |
684 | .PP | |
ddd2ef55 | 685 | The temporary files |
153f9a83 | 686 | .I /tmp/rstdir* |
ddd2ef55 | 687 | and |
153f9a83 SP |
688 | .I /tmp/rstmode* |
689 | are generated with a unique name based on the date of the dump and the process | |
690 | ID (see | |
691 | .BR mktemp (3) ), | |
ddd2ef55 | 692 | except when |
153f9a83 | 693 | .B \-r |
ddd2ef55 | 694 | or |
153f9a83 SP |
695 | .B \-R |
696 | is used. Because | |
697 | .B \-R | |
ddd2ef55 | 698 | allows you to restart a |
153f9a83 SP |
699 | .B \-r |
700 | operation that may have been interrupted, the temporary files should be the | |
701 | same across different processes. In all other cases, the files are unique | |
702 | because it is possible to have two different dumps started at the same time, | |
703 | and separate operations shouldn't conflict with each other. | |
704 | .PP | |
705 | To do a network restore, you have to run | |
706 | .B restore | |
707 | as root or use a remote shell replacement (see | |
708 | .B RSH | |
709 | variable). This is due to the previous security history of | |
710 | .B dump | |
711 | and | |
712 | .BR restore . | |
713 | ( | |
714 | .B restore | |
715 | is written to be setuid root, but we are not certain all bugs are gone from the | |
716 | code - run setuid at your own risk.) | |
4bb009da SP |
717 | .PP |
718 | At the end of restores in | |
719 | .B \-i | |
720 | or | |
721 | .B \-x | |
722 | modes (unless | |
723 | .B \-o | |
724 | option is in use), | |
725 | .B restore | |
726 | will ask the operator whether to set the permissions on the current | |
727 | directory. If the operator confirms this action, the permissions | |
728 | on the directory from where | |
729 | .B restore | |
730 | was launched will be replaced by the permissions on the dumped root | |
731 | inode. Although this behaviour is not really a bug, it has proven itself | |
732 | to be confusing for many users, so it is recommended to answer 'no', | |
733 | unless you're performing a full restore and you do want to restore the | |
734 | permissions on '/'. | |
153f9a83 | 735 | .SH AUTHOR |
8d4197bb | 736 | The |
153f9a83 SP |
737 | .B dump/restore |
738 | backup suite was ported to Linux's Second Extended File System by Remy Card | |
739 | <card@Linux.EU.Org>. He maintained the initial versions of | |
740 | .B dump | |
741 | (up and including 0.4b4, released in january 1997). | |
742 | .PP | |
743 | Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>. | |
744 | .SH AVAILABILITY | |
8d4197bb | 745 | The |
153f9a83 SP |
746 | .B dump/restore |
747 | backup suite is available from <http://dump.sourceforge.net> | |
748 | .SH HISTORY | |
1227625a | 749 | The |
153f9a83 SP |
750 | .B restore |
751 | command appeared in 4.2BSD. |