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