📄 restore.8
字号:
.\" SCCSID: @(#)restore.8 8.1 9/11/90.TH restore 8.SH Namerestore \- incremental file system restore.SH Syntax.B /etc/restore\fIkey\fR [ \fIname\fR... ].SH Description.NXB "restore command".NXA "dump command" "restore command".NXB "file system" "restoring incremental dumps"The.PN restorecommand reads from magnetic tapes, disks, a file, or a pipecreated by the.MS dump 8command. The default dump media from which files are read is.PN /dev/rmt0h . You can request another dump device or dump image file by usingthe .B fkey modifier.The.I keyis a character string containing one function letter and possibly one or more function modifiers. Other arguments to the command arefile or directory names specifying the files to be restored.Unless the.B hkey is specified, the appearance of a directoryname refers to all files and, recursively, the subdirectoriesof that directory.Thefunction portion of the keyis specified by one of the following letters:.SH Keys.NXB "restore command" "keys".TP 5 .B iThis key allows interactive restoration of files from the dump media.After reading in the directory information from the dump media,.PN restorelets the user movearound the directory tree selecting or deselectingfiles to be extracted.The available interactive commands are: .RS 5.TP 12\fBls \fR[\fIarg\fR]List the specified directory. If no directory is specified,the user's current directory is listed.Entries that are directories are appended with a slash (/).Entries that have been marked for extraction are prepended with an asterisk (*).If the .B verbose key is set,the inode number of each entry is also listed..TP\fBcd \fIarg\fRChange the current working directory to the directory specified..TP\fB pwd\fRPrint the full pathname of the current working directory..TP\fBadd\fR [\fIarg\fR] The current directory or the specified argument (a directory or file)is added to the extraction list (the list of files to be extracted). If a directory is specified, then it and all its descendents areadded to the extraction list,unless the.B hkey is specified on the command line.Files that are on the extraction list are prepended with anasterisk (*)when they are listed by .BR ls ..TP\fBdelete\fR [\fIarg\fR]The current directory or specified argumentis deleted from the extraction list (the list offiles to be extracted). If a directory is specified, then it and all its descendents aredeleted from the extraction list,unless the.B hkey modifier is specified on the command line.The easiest way to extract most of the files from a directory is to add the directory to the extraction list and then deletethose files that are not needed..TP\fBextract\fRAll the files on the extraction list are extractedfrom the dump media.The.PN restorecommand asks which volume the user wishes to mount..TP\fBverbose\fRThe verbose (.B v) key is toggled. Entering the command turns on verbose. Entering the commandagain turns off verbose.When used, the verbose key causes the .B lscommand to list the inode numbers of all entries.It also causes.PN restoreto print out information about each file as it is extracted..TP\fBhelp\fRList a summary of the available commands..TP\fBquit\fRThe.PN restore utility immediately exits,even if the extraction list is not empty..RE.TP 5.B RThe.PN restoreutility prompts for a particular volume of a multivolumeset on which to restart a full restore. This option lets.PN restorebe interrupted and then restarted..TP 5.B rThe dump media's data is read into the current directory.You should use this function key only to restore the completedump media onto a newly created file system, or to restore incrementaldump media after a full level-0 restore. See the Examples section fora typical sequence to restore complete dump media.Note that.PN restoreleaves a file, .PN restoresymtab ,in the root directory to pass information between incrementalrestore passes. Remove this file after the lastincremental dump media has been restored.A .MS dump 8 followed by a .MS newfs 8 and a .MS restore 8 can be used to change the size of a file system..TP 5.B tThe names of the specified files are listed if they occuron the dump media. If no .I nameargument is given, then theroot directory is listed. This results in the entire contentsof the dump media being listed, unless the.B hkey modifier has been specified..TP 5.B xThe files specified by the.I nameargument are extracted from the dump media. If a namedfile matches a directory whose contents had been written ontothe dump media and the.B hkey modifier is not specified, the directory is recursivelyextracted. The owner, modification time, and mode arerestored, if possible.If no.I nameargument is given, the root directory is extracted. Thisresults in the extraction of theentire contents of the dump media unlessthe.B hkey modifier has been specified..PPYou can use any of the following characters in addition to the letter that selects the function desired: .TP 5.B BThe next argument to.PN restoreis a number giving the size, in 1024-byte blocks, of afixed-size storage medium, such as diskettes or removabledisks (see the Examples section). The.PN restorecommand does not ask whether it should abort the restoreif there is a dump media read error. It always tries toskip over the bad block(s) and continue..TP 5.B fThe next argument to.PN restoreis used as the name of the archive instead of .PN /dev/rmt0h .If the argument is a dash (\fB\-\fR),.PN restorereads from standard input (see the Examples section)..TP 5.B hThe.PN restorecommand extracts the actual directory, rather than the filesthat it references. This prevents hierarchical restoration ofcomplete subtrees from the dump media:.TP 5.B mThe.PN restorecommand extracts by inode numbers rather than by file name. Thisis useful if only a few files are being extracted, and you wantto avoid typing the complete pathname to the file..TP 5.B sThe next argumentidentifieswhich dump file on the dump media is to be used by .PN restore .This is useful whenthe dump media has more than one dump image on it and not all of them will be restored..TP 5.B vNormally,.PN restoredoes its work silently.The.B v(verbose)key modifier causes it to displaythe name of each file it treats,preceded by its file type..NXE "restore command" "keys".SH Examples.NXR "restore command" "examples"The following example shows a typical sequence ofcommands to restore complete dump media..EX/etc/newfs /dev/rra0g ra60/etc/mount /dev/ra0g /mntcd /mntrestore r.EEAnother.PN restorecan be done to get an incremental dump..PPThe following example shows how.MS dump 8and.MS restore 8can be used in a pipeline to dump and restore a file system:.EXdump 0f - /usr | (cd /mnt; restore xf -).EEThe following example shows how to restore files interactivelyfrom a dump on RX50 diskettes:.EXrestore iBf 400 /dev/ra2a.EE.SH Restrictions.NXR "restore command" "restricted"The.PN restoreutilitycan make errors when doing incremental restores fromdump media that were made on active file systems..PPYou must do a level 0 dump after a full restore.Because .PN restore runs in user code,it has no control over inode allocation;thus, you must do a full .PN restore to get a new set of directoriesthat reflects the new inode numbering,even though the contents of the files are unchanged..SH Diagnostics.NXB "restore command" "diagnostics"Complains about bad key characters..PPComplains if it gets a dump media read error.If the user responds with a y,.PN restoreattempts to continue the restore..PPIf the dump extends over more than one dump volume,.PN restorewill ask the user to change volumes.If the.B xor.B ifunction key has been specified,.PN restorealso asks which volume the user wishes to mount..PPThere are numerous consistency checks that can be listed by.PN restore .Most checks are self-explanatory. Some common errors are: .PP.B "Converting to new file system format".brIf dump media created from the Fast File System (FFS)has been loaded.It is automatically converted to the Berkeley Version 4.2file system format..PP.B "<\fIfilename\fP>: not found on tape{disk}".brThe specified file name was listed in the dump media directory,but was not found on the media.This is caused by dump media read errors while looking for the fileor from using dump media created on an active file system..B "Expected next file <\fIinumber\fP>, got <\fIinumber\fP>".brA file that was not listed in the directory was found on the media.This can occur when using dump media created on an active file system..PP.B "Incremental tape{disk} too low".brWhen doing incremental restore,dump media was loaded that was written before the previous incremental mediaor has too low an incremental level. .PP .B "Incremental tape{disk} too high" .brWhen doing incremental restore,dump media that does not begin its coverage where the previous incremental dump media left off,or that has too high an incremental level has been loaded..PP .B "Tape{Disk} read error while restoring <\fIfilename\fP>".br.B "Dump media read error while skipping over inode <\fIinumber\fP>".br.B "Dump media read error while trying to resynchronize".brA dump media read error has occurred.If a file name is specified,then its contents are probably partially wrong.If an inode is being skipped or the restore is trying to resynchronize,then no extracted files have been corrupted,although files may not be found on the dump media..PP .B "resync restore, skipped <num> blocks".brAfter a dump media read error, .PN restoremay have to resynchronize itself.This message lists the number of blocks that were skipped. .NXE "restore command" "diagnostics".SH Files.TP 15.PN /dev/rmt0hDefault tape drive.TP.PN /tmp/rstdirFile containing directories on the dump media.TP.PN /tmp/rstmode*Owner, mode, and time stamps for directories.TP.PN /restoresymtabInformation passed between incremental restores.TP.PN /dev/ttyRequired for user interface.SH See Alsodump(8), mkfs(8), mount(8), rrestore(8c).NXE "file system" "restoring incremental dumps".NXE "restore command"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -