1 .\" Copyright (c) 1985, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
28 .\" $Id: restore.8.in,v 1.33 2005/07/07 09:16:08 stelian Exp $
30 .TH RESTORE 8 "version __VERSION__ of __DATE__" BSD "System management commands"
32 restore \- restore files or file systems from backups made with dump
36 [\fB\-b \fIblocksize\fR]
37 [\fB\-D \fIfilesystem\fR]
42 [\fB\-T \fIdirectory\fR]
45 [\fB\-acdhHklmMNouvVy\fR]
47 [\fB\-b \fIblocksize\fR]
52 [\fB\-T \fIdirectory\fR]
56 [\fB\-acdhHklmMNuvVy\fR]
58 [\fB\-b \fIblocksize\fR]
62 [\fB\-T \fIdirectory\fR]
63 [\fB\-X \fIfilelist\fR]
68 [\fB\-b \fIblocksize\fR]
72 [\fB\-T \fIdirectory\fR]
76 [\fB\-b \fIblocksize\fR]
80 [\fB\-T \fIdirectory\fR]
83 [\fB\-cdhHklMNuvVy\fR]
85 [\fB\-b \fIblocksize\fR]
90 [\fB\-T \fIdirectory\fR]
91 [\fB\-X \fIfilelist\fR]
95 [\fB\-adchHklmMNouvVy\fR]
97 [\fB\-b \fIblocksize\fR]
101 [\fB\-s \fIfileno\fR]
102 [\fB\-T \fIdirectory\fR]
103 [\fB\-X \fIfilelist\fR]
108 command performs the inverse function of
110 A full backup of a file system may be restored and subsequent incremental
111 backups layered on top of it. Single files and directory subtrees may be
112 restored from full or partial backups.
114 works across a network; to do this see the
116 flag described below. Other arguments to the command are file or directory
117 names specifying the files that are to be restored. Unless the
119 flag is specified (see below), the appearance of a directory name refers to
120 the files and (recursively) subdirectories of that directory.
122 Exactly one of the following flags is required:
125 This mode allows comparison of files from a dump.
127 reads the backup and compares its contents with files present on the disk. It
128 first changes its working directory to the root of the filesystem that was
129 dumped and compares the tape with the files in its new current directory. See
132 flag described below.
135 This mode allows interactive restoration of files from a dump. After reading in
136 the directory information from the dump,
138 provides a shell like interface that allows the user to move around the
139 directory tree selecting files to be extracted. The available commands are
140 given below; for those commands that require an argument, the default is the
144 .B add \fR[\fIarg\fR]
145 The current directory or specified argument is added to the list of files to be
146 extracted. If a directory is specified, then it and all its descendents are
147 added to the extraction list (unless the
149 flag is specified on the command line). Files that are on the extraction list
150 are prepended with a \*(lq*\*(rq when they are listed by
154 Change the current working directory to the specified argument.
156 .B delete \fR[\fIarg\fR]
157 The current directory or specified argument is deleted from the list of files
158 to be extracted. If a directory is specified, then it and all its descendents
159 are deleted from the extraction list (unless the
161 flag is specified on the command line). The most expedient way to extract most
162 of the files from a directory is to add the directory to the extraction list
163 and then delete those files that are not needed.
166 All files on the extraction list are extracted from the dump.
168 will ask which volume the user wishes to mount. The fastest way to extract a f
169 ew files is to start with the last volume and work towards the first volume.
172 List a summary of the available commands.
175 List the current or specified directory. Entries that are directories are
176 appended with a \*(lq/\*(rq. Entries that have been marked for extraction are
177 prepended with a \*(lq*\*(rq. If the verbose flag is set, the inode number of
178 each entry is also listed.
181 Print the full pathname of the current working directory.
185 immediately exits, even if the extraction list is not empty.
188 All directories that have been added to the extraction list have their owner,
189 modes, and times set; nothing is extracted from the dump. This is useful for
192 has been prematurely aborted.
197 flag is toggled. When set, the verbose flag causes the
199 command to list the inode numbers of all entries. It also causes
201 to print out information about each file as it is extracted.
206 creates a new Quick File Access file
208 from an existing dump file without restoring its contents.
212 requests a particular tape of a multi-volume set on which to restart a full
215 flag below). This is useful if the restore has been interrupted.
218 Restore (rebuild) a file system. The target file system should be made pristine
221 mounted, and the user
223 into the pristine file system before starting the restoration of the initial
224 level 0 backup. If the level 0 restores successfully, the
226 flag may be used to restore any necessary incremental backups on top of the
229 flag precludes an interactive file extraction and can be detrimental to one's
230 health (not to mention the disk) if not used carefully. An example:
235 .B mount /dev/sda1 /mnt
239 .B restore rf /dev/st0
246 in the root directory to pass information between incremental restore passes.
247 This file should be removed when the last incremental has been restored.
254 may be used to modify file system parameters such as size or block size.
257 The names of the specified files are listed if they occur on the backup. If no
258 file argument is given, the root directory is listed, which results in the
259 entire content of the backup being listed, unless the
261 flag has been specified. Note that the
263 flag replaces the function of the old
265 program. See also the
270 The named files are read from the given media. If a named file matches a
271 directory whose contents are on the backup and the
273 flag is not specified, the directory is recursively extracted. The owner,
274 modification time, and mode are restored (if possible). If no file argument is
275 given, the root directory is extracted, which results in the entire content of
276 the backup being extracted, unless the
278 flag has been specified. See also the
282 The following additional options may be specified:
291 does ask the user for the volume number on which the files to be extracted are
292 supposed to be (in order to minimise the time by reading only the interesting
295 option disables this behaviour and reads all the volumes starting with 1. This
296 option is useful when the operator does not know on which volume the files to
297 be extracted are and/or when he prefers the longer unattended mode rather than
298 the shorter interactive mode.
300 .BI \-A " archive_file"
301 Read the table of contents from
303 instead of the media. This option can be used in combination with the
308 options, making it possible to check whether files are on the media without
309 having to mount the media.
312 The number of kilobytes per dump record. If the
314 option is not specified,
316 tries to determine the media block size dynamically.
321 will try to determine dynamically whether the dump was made from an old
322 (pre-4.4) or new format file system. The
324 flag disables this check, and only allows reading a dump in the old format.
331 to print debug information.
333 .BI \-D " filesystem"
336 flag allows the user to specify the filesystem name when using
340 option to check the backup.
346 may be a special device file like
350 (a disk drive), an ordinary file, or
352 (the standard input). If the name of the file is of the form
357 reads from the named file on the remote host using
361 Run script at the beginning of each tape. The device name and the current
362 volume number are passed on the command line. The script must return 0 if
364 should continue without asking the user to change the tape, 1 if
366 should continue but ask the user to change the tape. Any other exit code will
369 to abort. For security reasons,
371 reverts back to the real user ID and the real group ID before running the
375 Extract the actual directory, rather than the files that it references. This
376 prevents hierarchical restoration of complete subtrees from the dump.
379 Use a hashtable having the specified number of entries for storing the
380 directories entries instead of a linked list. This hashtable will
381 considerably speed up inode lookups (visible especialy in interactive
382 mode when adding/removing files from the restore list), but at the
383 price of much more memory usage. The default value is 1, meaning no
387 Use Kerberos authentication when contacting the remote tape server. (Only
388 available if this options was enabled when
393 When doing remote restores, assume the remote file is a regular file (instead
394 of a tape device). If you're restoring a remote compressed file, you will need
395 to specify this option or
397 will fail to access it correctly.
402 flag allows the user to specify a maximal number of miscompares when using
406 option to check the backup. If this limit is reached,
408 will abort with an error message. A value of 0 (the default value) disables
412 Extract by inode numbers rather than by file name. This is useful if only a few
413 files are being extracted, and one wants to avoid regenerating the complete
414 pathname to the file.
417 Enables the multi-volume feature (for reading dumps made using the
419 option of dump). The name specified with
421 is treated as a prefix and
423 tries to read in sequence from
424 .I <prefix>001, <prefix>002
432 to perform a full execution as requested by one of
439 command without actually writing any file on disk.
446 to automatically restore the current directory permissions without asking the
447 operator whether to do so in one of
456 in order to read tape position as stored using the dump Quick File Access mode,
464 It is recommended to set up the st driver to return logical tape positions
465 rather than physical before calling
469 Since not all tape devices support physical tape positions those tape devices
470 return an error during
472 when the st driver is set to the default physical setting. Please see the
478 man page, on how to set the driver to return logical tape positions.
484 always make sure the st driver is set to return the same type of tape position
485 used during the call to
491 This option can be used when restoring from local or remote tapes (see above)
492 or from local or remote files.
495 Read from the specified
497 on a multi-file tape. File numbering starts at 1.
502 flag allows the user to specify a directory to use for the storage of temporary
503 files. The default value is
505 This flag is most useful when restoring files after having booted from a
506 floppy. There might be little or no space on the floppy filesystem, but another
507 source of space might exist.
510 When creating certain types of files,
512 may generate a warning diagnostic if they already exist in the target
513 directory. To prevent this, the
517 to remove old entries before attempting to create new ones.
522 does its work silently. The
524 (verbose) flag causes it to type the name of each file it treats preceded by
528 Enables reading multi-volume non-tape mediums like CDROMs.
531 Read list of files to be listed or extracted from the text file
533 in addition to those specified on the command line. This can be used in
540 should contain file names separated by newlines.
542 may be an ordinary file or
544 (the standard input).
547 Do not ask the user whether to abort the restore in the event of an error.
548 Always try to skip over the bad block(s) and continue.
550 (The 4.3BSD option syntax is implemented for backward compatibility but is not
553 Complains if it gets a read error. If
555 has been specified, or the user responds
558 will attempt to continue the restore.
560 If a backup was made using more than one tape volume,
562 will notify the user when it is time to mount the next volume. If the
566 flag has been specified,
568 will also ask which volume the user wishes to mount. The fastest way to extract
569 a few files is to start with the last volume, and work towards the first volume.
571 There are numerous consistency checks that can be listed by
573 Most checks are self-explanatory or can \*(lqnever happen\*(rq. Common errors
576 .I Converting to new file system format
577 A dump tape created from the old file system has been loaded. It is
578 automatically converted to the new file system format.
580 .I <filename>: not found on tape
581 The specified file name was listed in the tape directory, but was not found on
582 the tape. This is caused by tape read errors while looking for the file, and
583 from using a dump tape created on an active file system.
585 .I expected next file <inumber>, got <inumber>
586 A file that was not listed in the directory showed up. This can occur when
587 using a dump created on an active file system.
589 .I Incremental dump too low
590 When doing an incremental restore, a dump that was written before the previous
591 incremental dump, or that has too low an incremental level has been loaded.
593 .I Incremental dump too high
594 When doing an incremental restore, a dump that does not begin its coverage
595 where the previous incremental dump left off, or that has too high an
596 incremental level has been loaded.
598 .I Tape read error while restoring <filename>
600 .I Tape read error while skipping over inode <inumber>
602 .I Tape read error while trying to resynchronize
603 A tape (or other media) read error has occurred. If a file name is specified,
604 its contents are probably partially wrong. If an inode is being skipped or the
605 tape is trying to resynchronize, no extracted files have been corrupted, though
606 files may not be found on the tape.
608 .I resync restore, skipped <num> blocks
609 After a dump read error,
611 may have to resynchronize itself. This message lists the number of blocks that
615 exits with zero status on success. Tape errors are indicated with an exit code
618 When doing a comparison of files from a dump, an exit code of 2 indicates that
619 some files were modified or deleted since the dump was made.
621 If the following environment variable exists it will be utilized by
627 option was specified,
629 will use the device specified via
637 .IR user@host:tapename .
640 The directory given in
642 will be used instead of
644 to store temporary files.
647 The environment variable
649 will be used to determine the pathname of the remote
655 uses the contents of this variable to determine the name of the remote shell
656 command to use when doing a network restore (rsh, ssh etc.). If this variable
659 will be used, but only root will be able to do a network restore.
663 the default tape drive
666 file containing directories on the tape
669 owner, mode, and time stamps for directories
672 information passed between incremental restores
680 can get confused when doing incremental restores from dumps that were made on
683 A level 0 dump must be done after a full restore. Because
685 runs in user code, it has no control over inode allocation; thus a full dump
686 must be done to get a new set of directories reflecting the new inode
687 numbering, even though the content of the files is unchanged.
693 are generated with a unique name based on the date of the dump and the process
702 allows you to restart a
704 operation that may have been interrupted, the temporary files should be the
705 same across different processes. In all other cases, the files are unique
706 because it is possible to have two different dumps started at the same time,
707 and separate operations shouldn't conflict with each other.
709 To do a network restore, you have to run
711 as root or use a remote shell replacement (see
713 variable). This is due to the previous security history of
719 is written to be setuid root, but we are not certain all bugs are gone from the
720 code - run setuid at your own risk.)
722 At the end of restores in
730 will ask the operator whether to set the permissions on the current
731 directory. If the operator confirms this action, the permissions
732 on the directory from where
734 was launched will be replaced by the permissions on the dumped root
735 inode. Although this behaviour is not really a bug, it has proven itself
736 to be confusing for many users, so it is recommended to answer 'no',
737 unless you're performing a full restore and you do want to restore the
740 It should be underlined that because it runs in user code,
744 option, sees the files as the kernel presents them, whereas
746 sees all the files on a given filesystem. In particular, this
747 can cause some confusion when comparing a dumped filesystem a part
748 of which is hidden by a filesystem mounted on top of it.
752 backup suite was ported to Linux's Second Extended File System by Remy Card
753 <card@Linux.EU.Org>. He maintained the initial versions of
755 (up and including 0.4b4, released in january 1997).
757 Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
761 backup suite is available from <http://dump.sourceforge.net>
765 command appeared in 4.2BSD.