X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Frestore.8;h=676e3c4107c89b55b7de4b52625e327a9acd00e7;hp=667729bbd3108779b66e30d254a44da64b6b7d6b;hb=ddd2ef55b78a62c4bc3daad18bef8a90e85a2052;hpb=b45f51d61e911ac8a040bef1efda6afd82261e03 diff --git a/restore/restore.8 b/restore/restore.8 index 667729b..676e3c4 100644 --- a/restore/restore.8 +++ b/restore/restore.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)restore.8 8.4 (Berkeley) 5/1/95 -.\" $Id: restore.8,v 1.2 1999/10/11 12:53:24 stelian Exp $ +.\" $Id: restore.8,v 1.3 1999/10/11 12:59:20 stelian Exp $ .\" .Dd May 1, 1995 .Dt RESTORE 8 @@ -88,7 +88,7 @@ .in -\\n(iSu (The .Bx 4.3 -option syntax is implemented for backward compatibility, but +option syntax is implemented for backward compatibility but is not documented here.) .Sh DESCRIPTION The @@ -141,7 +141,8 @@ added to the extraction list (unless the .Fl h flag is specified on the command line). -Files that are on the extraction list are prepended with a ``*'' +Files that are on the extraction list are prepended with a +.Dq \&* when they are listed by .Ic ls . .It Ic \&cd Ar arg @@ -158,27 +159,28 @@ The most expedient way to extract most of the files from a directory is to add the directory to the extraction list and then delete those files that are not needed. .It Ic extract -All the files that are on the extraction list are extracted +All files on the extraction list are extracted from the dump. .Nm Restore will ask which volume the user wishes to mount. The fastest way to extract a few files is to -start with the last volume, and work towards the first volume. +start with the last volume and work towards the first volume. .It Ic help List a summary of the available commands. .It Ic \&ls Op Ar arg List the current or specified directory. -Entries that are directories are appended with a ``/''. +Entries that are directories are appended with a +.Dq \&* . Entries that have been marked for extraction are prepended with a ``*''. If the verbose -flag is set the inode number of each entry is also listed. +flag is set, the inode number of each entry is also listed. .It Ic pwd Print the full pathname of the current working directory. .It Ic quit Restore immediately exits, even if the extraction list is not empty. .It Ic setmodes -All the directories that have been added to the extraction list +All directories that have been added to the extraction list have their owner, modes, and times set; nothing is extracted from the dump. This is useful for cleaning up after a restore has been prematurely aborted. @@ -195,17 +197,17 @@ to print out information about each file as it is extracted. .El .It Fl R .Nm Restore -requests a particular tape of a multi volume set on which to restart +requests a particular tape of a multi-volume set on which to restart a full restore (see the .Fl r flag below). This is useful if the restore has been interrupted. .It Fl r -Restore (rebuild a file system). +Restore (rebuild) a file system. The target file system should be made pristine with .Xr newfs 8 , -mounted and the user +mounted, and the user .Xr cd Ns 'd into the pristine file system before starting the restoration of the initial level 0 backup. If the @@ -216,8 +218,8 @@ any necessary incremental backups on top of the level 0. The .Fl r flag precludes an interactive file extraction and can be -detrimental to one's health if not used carefully (not to mention -the disk). An example: +detrimental to one's health (not to mention the disk) if not used carefully. +An example: .Bd -literal -offset indent newfs /dev/rrp0g eagle mount /dev/rp0g /mnt @@ -246,7 +248,7 @@ such as size or block size. The names of the specified files are listed if they occur on the backup. If no file argument is given, -then the root directory is listed, +the root directory is listed, which results in the entire content of the backup being listed, unless the @@ -269,7 +271,7 @@ the directory is recursively extracted. The owner, modification time, and mode are restored (if possible). If no file argument is given, -then the root directory is extracted, +the root directory is extracted, which results in the entire content of the backup being extracted, unless the @@ -308,7 +310,7 @@ Read the backup from .Ar file may be a special device file like -.Pa /dev/rmt12 +.Pa /dev/st0 (a tape drive), .Pa /dev/rsd1c (a disk drive), @@ -317,7 +319,7 @@ or .Ql Fl (the standard input). If the name of the file is of the form -.Dq host:file , +.Dq host:file or .Dq user@host:file , .Nm restore @@ -378,7 +380,7 @@ Do not ask the user whether to abort the restore in the event of an error. Always try to skip over the bad block(s) and continue. .El .Sh DIAGNOSTICS -Complaints if it gets a read error. +Complains if it gets a read error. If .Fl y has been specified, or the user responds @@ -401,11 +403,12 @@ start with the last volume, and work towards the first volume. .Pp There are numerous consistency checks that can be listed by .Nm restore . -Most checks are self-explanatory or can ``never happen''. +Most checks are self-explanatory or can +.Dq never happen . Common errors are given below. .Pp .Bl -tag -width Ds -compact -.It Converting to new file system format. +.It Converting to new file system format A dump tape created from the old file system has been loaded. It is automatically converted to the new file system format. .Pp @@ -420,12 +423,12 @@ A file that was not listed in the directory showed up. This can occur when using a dump created on an active file system. .Pp .It Incremental dump too low -When doing incremental restore, +When doing an incremental restore, a dump that was written before the previous incremental dump, or that has too low an incremental level has been loaded. .Pp .It Incremental dump too high -When doing incremental restore, +When doing an incremental restore, a dump that does not begin its coverage where the previous incremental dump left off, or that has too high an incremental level has been loaded. @@ -435,9 +438,9 @@ or that has too high an incremental level has been loaded. .It Tape read error while trying to resynchronize A tape (or other media) read error has occurred. If a file name is specified, -then its contents are probably partially wrong. +its contents are probably partially wrong. If an inode is being skipped or the tape is trying to resynchronize, -then no extracted files have been corrupted, +no extracted files have been corrupted, though files may not be found on the tape. .Pp .It resync restore, skipped blocks @@ -447,7 +450,10 @@ may have to resynchronize itself. This message lists the number of blocks that were skipped over. .El .Sh ENVIRONMENT -.Bl -tag -width Fl +If the following environment variable exists it will be utilized by +.Nm restore : +.Pp +.Bl -tag -width "TMPDIR" -compact .It Ev TAPE If no -f option was specified, .Nm @@ -457,9 +463,16 @@ as the dump device. .Ev TAPE may be of the form .Qq tapename , -.Qq host:tapename , +.Qq host:tapename or .Qq user@host:tapename . +.It Ev TMPDIR +The directory given in +.Ev TMPDIR +will be used +instead of +.Pa /tmp +to store temporary files. .It Ev RMT The environment variable .Ev RMT @@ -468,14 +481,14 @@ will be used to determine the pathname of the remote program. .Sh FILES .Bl -tag -width "./restoresymtable" -compact -.It Pa /dev/rmt? +.It Pa /dev/st0 the default tape drive .It Pa /tmp/rstdir* -file containing directories on the tape. +file containing directories on the tape .It Pa /tmp/rstmode* -owner, mode, and time stamps for directories. +owner, mode, and time stamps for directories .It Pa \&./restoresymtable -information passed between incremental restores. +information passed between incremental restores .El .Sh SEE ALSO .Xr dump 8 , @@ -488,12 +501,36 @@ information passed between incremental restores. can get confused when doing incremental restores from dumps that were made on active file systems. .Pp -A level zero dump must be done after a full restore. -Because restore runs in user code, +A level 0 dump must be done after a full restore. +Because +.Nm restore +runs in user code, it has no control over inode allocation; thus a full dump must be done to get a new set of directories reflecting the new inode numbering, -even though the contents of the files is unchanged. +even though the content of the files is unchanged. +.Pp +The temporary files +.Pa /tmp/rstdir* +and +.Pa /tmp/rstmode* +are generated with a unique name based on the date of the dump +and the process ID (see +.Xr mktemp 3 ), +except when +.Fl r +or +.Fl R +is used. +Because +.Fl R +allows you to restart a +.Fl r +operation that may have been interrupted, the temporary files should +be the same across different processes. +In all other cases, the files are unique because it is possible to +have two different dumps started at the same time, and separate +operations shouldn't conflict with each other. .Pp To do a network restore, you have to run restore as root. This is due to the previous security history of dump and restore. (restore is