18fae3551SRodney W. Grimes.\" Copyright (c) 1985, 1991, 1993 28fae3551SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 38fae3551SRodney W. Grimes.\" 48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions 68fae3551SRodney W. Grimes.\" are met: 78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 88fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 108fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 118fae3551SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 138fae3551SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 148fae3551SRodney W. Grimes.\" without specific prior written permission. 158fae3551SRodney W. Grimes.\" 168fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 178fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 188fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 198fae3551SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 208fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 218fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 228fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 238fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 248fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 258fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 268fae3551SRodney W. Grimes.\" SUCH DAMAGE. 278fae3551SRodney W. Grimes.\" 28325301a7SRuslan Ermilov.Dd October 12, 2006 298fae3551SRodney W. Grimes.Dt RESTORE 8 309fe48c6eSRuslan Ermilov.Os 318fae3551SRodney W. Grimes.Sh NAME 320c39ec03SAlexey Zelkin.Nm restore , 330c39ec03SAlexey Zelkin.Nm rrestore 348fae3551SRodney W. Grimes.Nd "restore files or file systems from backups made with dump" 358fae3551SRodney W. Grimes.Sh SYNOPSIS 367c7fb079SRuslan Ermilov.Nm 37d87d79aeSPeter Wemm.Fl i 38cbc8bb98SDavid Malone.Op Fl dDhmNuvy 39d87d79aeSPeter Wemm.Op Fl b Ar blocksize 40c51d70c6SBrian Feldman.Op Fl f Ar file | Fl P Ar pipecommand 41d87d79aeSPeter Wemm.Op Fl s Ar fileno 427c7fb079SRuslan Ermilov.Nm 43d87d79aeSPeter Wemm.Fl R 44cbc8bb98SDavid Malone.Op Fl dDNuvy 45d87d79aeSPeter Wemm.Op Fl b Ar blocksize 46c51d70c6SBrian Feldman.Op Fl f Ar file | Fl P Ar pipecommand 47d87d79aeSPeter Wemm.Op Fl s Ar fileno 487c7fb079SRuslan Ermilov.Nm 49d87d79aeSPeter Wemm.Fl r 50cbc8bb98SDavid Malone.Op Fl dDNuvy 51d87d79aeSPeter Wemm.Op Fl b Ar blocksize 52c51d70c6SBrian Feldman.Op Fl f Ar file | Fl P Ar pipecommand 53d87d79aeSPeter Wemm.Op Fl s Ar fileno 547c7fb079SRuslan Ermilov.Nm 55d87d79aeSPeter Wemm.Fl t 56cbc8bb98SDavid Malone.Op Fl dDhNuvy 57d87d79aeSPeter Wemm.Op Fl b Ar blocksize 58c51d70c6SBrian Feldman.Op Fl f Ar file | Fl P Ar pipecommand 59d87d79aeSPeter Wemm.Op Fl s Ar fileno 6047dec781SRuslan Ermilov.Op Ar 617c7fb079SRuslan Ermilov.Nm 62d87d79aeSPeter Wemm.Fl x 63cbc8bb98SDavid Malone.Op Fl dDhmNuvy 64d87d79aeSPeter Wemm.Op Fl b Ar blocksize 65c51d70c6SBrian Feldman.Op Fl f Ar file | Fl P Ar pipecommand 66d87d79aeSPeter Wemm.Op Fl s Ar fileno 6747dec781SRuslan Ermilov.Op Ar 688fae3551SRodney W. Grimes.Sh DESCRIPTION 698fae3551SRodney W. GrimesThe 707c7fb079SRuslan Ermilov.Nm 71629e80efSPhilippe Charnierutility performs the inverse function of 728fae3551SRodney W. Grimes.Xr dump 8 . 738fae3551SRodney W. GrimesA full backup of a file system may be restored and 748fae3551SRodney W. Grimessubsequent incremental backups layered on top of it. 758fae3551SRodney W. GrimesSingle files and 768fae3551SRodney W. Grimesdirectory subtrees may be restored from full or partial 778fae3551SRodney W. Grimesbackups. 78629e80efSPhilippe CharnierThe 79629e80efSPhilippe Charnier.Nm 80629e80efSPhilippe Charnierutility works across a network; 818fae3551SRodney W. Grimesto do this see the 828fae3551SRodney W. Grimes.Fl f 83c51d70c6SBrian Feldmanand 84c51d70c6SBrian Feldman.Fl P 85c51d70c6SBrian Feldmanflags described below. 868fae3551SRodney W. GrimesOther arguments to the command are file or directory 878fae3551SRodney W. Grimesnames specifying the files that are to be restored. 888fae3551SRodney W. GrimesUnless the 89d87d79aeSPeter Wemm.Fl h 90d87d79aeSPeter Wemmflag is specified (see below), 918fae3551SRodney W. Grimesthe appearance of a directory name refers to 928fae3551SRodney W. Grimesthe files and (recursively) subdirectories of that directory. 938fae3551SRodney W. Grimes.Pp 94a692c58aSJoel Dahl.Nm 95a692c58aSJoel Dahlmay also be invoked as 96a692c58aSJoel Dahl.Nm rrestore . 97a692c58aSJoel DahlThe 98a692c58aSJoel Dahl.Bx 4.3 99a692c58aSJoel Dahloption syntax is implemented for backward compatibility, but 100a692c58aSJoel Dahlis not documented here. 101a692c58aSJoel Dahl.Pp 102d87d79aeSPeter WemmExactly one of the following flags is required: 1038fae3551SRodney W. Grimes.Bl -tag -width Ds 104d87d79aeSPeter Wemm.It Fl i 105d87d79aeSPeter WemmThis mode allows interactive restoration of files from a dump. 106d87d79aeSPeter WemmAfter reading in the directory information from the dump, 1077c7fb079SRuslan Ermilov.Nm 108d87d79aeSPeter Wemmprovides a shell like interface that allows the user to move 109d87d79aeSPeter Wemmaround the directory tree selecting files to be extracted. 110d87d79aeSPeter WemmThe available commands are given below; 111d87d79aeSPeter Wemmfor those commands that require an argument, 112d87d79aeSPeter Wemmthe default is the current directory. 113d87d79aeSPeter Wemm.Bl -tag -width Fl 114d87d79aeSPeter Wemm.It Ic add Op Ar arg 115d87d79aeSPeter WemmThe current directory or specified argument is added to the list of 116d87d79aeSPeter Wemmfiles to be extracted. 117d87d79aeSPeter WemmIf a directory is specified, then it and all its descendents are 118d87d79aeSPeter Wemmadded to the extraction list 119d87d79aeSPeter Wemm(unless the 120d87d79aeSPeter Wemm.Fl h 121d87d79aeSPeter Wemmflag is specified on the command line). 122d87d79aeSPeter WemmFiles that are on the extraction list are prepended with a ``*'' 123d87d79aeSPeter Wemmwhen they are listed by 124d87d79aeSPeter Wemm.Ic ls . 125d87d79aeSPeter Wemm.It Ic \&cd Ar arg 126d87d79aeSPeter WemmChange the current working directory to the specified argument. 127d87d79aeSPeter Wemm.It Ic delete Op Ar arg 128d87d79aeSPeter WemmThe current directory or specified argument is deleted from the list of 129d87d79aeSPeter Wemmfiles to be extracted. 130d87d79aeSPeter WemmIf a directory is specified, then it and all its descendents are 131d87d79aeSPeter Wemmdeleted from the extraction list 132d87d79aeSPeter Wemm(unless the 133d87d79aeSPeter Wemm.Fl h 134d87d79aeSPeter Wemmflag is specified on the command line). 135d87d79aeSPeter WemmThe most expedient way to extract most of the files from a directory 136d87d79aeSPeter Wemmis to add the directory to the extraction list and then delete 137d87d79aeSPeter Wemmthose files that are not needed. 138d87d79aeSPeter Wemm.It Ic extract 139d87d79aeSPeter WemmAll the files that are on the extraction list are extracted 140d87d79aeSPeter Wemmfrom the dump. 141629e80efSPhilippe CharnierThe 142629e80efSPhilippe Charnier.Nm 143629e80efSPhilippe Charnierutility will ask which volume the user wishes to mount. 144d87d79aeSPeter WemmThe fastest way to extract a few files is to 145d87d79aeSPeter Wemmstart with the last volume, and work towards the first volume. 146d87d79aeSPeter Wemm.It Ic help 147d87d79aeSPeter WemmList a summary of the available commands. 148d87d79aeSPeter Wemm.It Ic \&ls Op Ar arg 149d87d79aeSPeter WemmList the current or specified directory. 150d87d79aeSPeter WemmEntries that are directories are appended with a ``/''. 151d87d79aeSPeter WemmEntries that have been marked for extraction are prepended with a ``*''. 152d87d79aeSPeter WemmIf the verbose 153d87d79aeSPeter Wemmflag is set the inode number of each entry is also listed. 154d87d79aeSPeter Wemm.It Ic pwd 155d87d79aeSPeter WemmPrint the full pathname of the current working directory. 156d87d79aeSPeter Wemm.It Ic quit 157629e80efSPhilippe CharnierExit immediately, 158d87d79aeSPeter Wemmeven if the extraction list is not empty. 159d87d79aeSPeter Wemm.It Ic setmodes 160d87d79aeSPeter WemmAll the directories that have been added to the extraction list 161d87d79aeSPeter Wemmhave their owner, modes, and times set; 162d87d79aeSPeter Wemmnothing is extracted from the dump. 163d87d79aeSPeter WemmThis is useful for cleaning up after a restore has been prematurely aborted. 164d87d79aeSPeter Wemm.It Ic verbose 165d87d79aeSPeter WemmThe sense of the 166d87d79aeSPeter Wemm.Fl v 167d87d79aeSPeter Wemmflag is toggled. 168d87d79aeSPeter WemmWhen set, the verbose flag causes the 169d87d79aeSPeter Wemm.Ic ls 170d87d79aeSPeter Wemmcommand to list the inode numbers of all entries. 171d87d79aeSPeter WemmIt also causes 1727c7fb079SRuslan Ermilov.Nm 173d87d79aeSPeter Wemmto print out information about each file as it is extracted. 17426f4fa24SMike Heffner.It Ic what 175629e80efSPhilippe CharnierDisplay dump header information, which includes: date, 17626f4fa24SMike Heffnerlevel, label, and the file system and host dump was made 17726f4fa24SMike Heffnerfrom. 178d87d79aeSPeter Wemm.El 179d87d79aeSPeter Wemm.It Fl R 180629e80efSPhilippe CharnierRequest a particular tape of a multi volume set on which to restart 181d87d79aeSPeter Wemma full restore 182d87d79aeSPeter Wemm(see the 183d87d79aeSPeter Wemm.Fl r 184d87d79aeSPeter Wemmflag below). 185d87d79aeSPeter WemmThis is useful if the restore has been interrupted. 186d87d79aeSPeter Wemm.It Fl r 1878fae3551SRodney W. GrimesRestore (rebuild a file system). 1888fae3551SRodney W. GrimesThe target file system should be made pristine with 1898fae3551SRodney W. Grimes.Xr newfs 8 , 190d87d79aeSPeter Wemmmounted and the user 1919680d7b6SPhilippe Charnier.Xr cd 1 Ns 'd 1928fae3551SRodney W. Grimesinto the pristine file system 193ef8f7ac9SSheldon Hearnbefore starting the restoration of the initial level 0 backup. 194ef8f7ac9SSheldon HearnIf the 1958fae3551SRodney W. Grimeslevel 0 restores successfully, the 196d87d79aeSPeter Wemm.Fl r 197d87d79aeSPeter Wemmflag may be used to restore 1988fae3551SRodney W. Grimesany necessary incremental backups on top of the level 0. 1998fae3551SRodney W. GrimesThe 200d87d79aeSPeter Wemm.Fl r 201d87d79aeSPeter Wemmflag precludes an interactive file extraction and can be 2028fae3551SRodney W. Grimesdetrimental to one's health if not used carefully (not to mention 2039806e231SRuslan Ermilovthe disk). 2049806e231SRuslan ErmilovAn example: 2058fae3551SRodney W. Grimes.Bd -literal -offset indent 206334f24bbSKris Kennawaynewfs /dev/da0s1a 207334f24bbSKris Kennawaymount /dev/da0s1a /mnt 2088fae3551SRodney W. Grimescd /mnt 2098fae3551SRodney W. Grimes 21002344806SDavid E. O'Brienrestore rf /dev/sa0 2118fae3551SRodney W. Grimes.Ed 2128fae3551SRodney W. Grimes.Pp 2138fae3551SRodney W. GrimesNote that 2147c7fb079SRuslan Ermilov.Nm 2158fae3551SRodney W. Grimesleaves a file 2168fae3551SRodney W. Grimes.Pa restoresymtable 2178fae3551SRodney W. Grimesin the root directory to pass information between incremental 2188fae3551SRodney W. Grimesrestore passes. 2198fae3551SRodney W. GrimesThis file should be removed when the last incremental has been 2208fae3551SRodney W. Grimesrestored. 2218fae3551SRodney W. Grimes.Pp 222629e80efSPhilippe CharnierThe 223629e80efSPhilippe Charnier.Nm 224629e80efSPhilippe Charnierutility , 2258fae3551SRodney W. Grimesin conjunction with 2268fae3551SRodney W. Grimes.Xr newfs 8 2278fae3551SRodney W. Grimesand 2288fae3551SRodney W. Grimes.Xr dump 8 , 2298fae3551SRodney W. Grimesmay be used to modify file system parameters 2308fae3551SRodney W. Grimessuch as size or block size. 231d87d79aeSPeter Wemm.It Fl t 232d87d79aeSPeter WemmThe names of the specified files are listed if they occur 233d87d79aeSPeter Wemmon the backup. 234d87d79aeSPeter WemmIf no file argument is given, 235d87d79aeSPeter Wemmthen the root directory is listed, 236d87d79aeSPeter Wemmwhich results in the entire content of the 237d87d79aeSPeter Wemmbackup being listed, 238d87d79aeSPeter Wemmunless the 239d87d79aeSPeter Wemm.Fl h 240d87d79aeSPeter Wemmflag has been specified. 241d87d79aeSPeter WemmNote that the 242d87d79aeSPeter Wemm.Fl t 243d87d79aeSPeter Wemmflag replaces the function of the old 244d87d79aeSPeter Wemm.Xr dumpdir 8 245d87d79aeSPeter Wemmprogram. 246d87d79aeSPeter Wemm.It Fl x 2478fae3551SRodney W. GrimesThe named files are read from the given media. 2488fae3551SRodney W. GrimesIf a named file matches a directory whose contents 2498fae3551SRodney W. Grimesare on the backup 2508fae3551SRodney W. Grimesand the 251d87d79aeSPeter Wemm.Fl h 252d87d79aeSPeter Wemmflag is not specified, 2538fae3551SRodney W. Grimesthe directory is recursively extracted. 2548fae3551SRodney W. GrimesThe owner, modification time, 2558fae3551SRodney W. Grimesand mode are restored (if possible). 2568fae3551SRodney W. GrimesIf no file argument is given, 2578fae3551SRodney W. Grimesthen the root directory is extracted, 2588fae3551SRodney W. Grimeswhich results in the entire content of the 2598fae3551SRodney W. Grimesbackup being extracted, 2608fae3551SRodney W. Grimesunless the 261d87d79aeSPeter Wemm.Fl h 262d87d79aeSPeter Wemmflag has been specified. 2638fae3551SRodney W. Grimes.El 2648fae3551SRodney W. Grimes.Pp 265d87d79aeSPeter WemmThe following additional options may be specified: 2668fae3551SRodney W. Grimes.Bl -tag -width Ds 267d87d79aeSPeter Wemm.It Fl b Ar blocksize 268d87d79aeSPeter WemmThe number of kilobytes per dump record. 2698fae3551SRodney W. GrimesIf the 2708fae3551SRodney W. Grimes.Fl b 2718fae3551SRodney W. Grimesoption is not specified, 2727c7fb079SRuslan Ermilov.Nm 2738fae3551SRodney W. Grimestries to determine the media block size dynamically. 274a17d5ec5SCrist J. Clark.It Fl d 275a17d5ec5SCrist J. ClarkSends verbose debugging output to the standard error. 276cbc8bb98SDavid Malone.It Fl D 277cbc8bb98SDavid MaloneThis puts 278cbc8bb98SDavid Malone.Nm 279cbc8bb98SDavid Maloneinto degraded mode, 280cbc8bb98SDavid Malonecausing restore to operate less efficiently 281cbc8bb98SDavid Malonebut to try harder to read corrupted backups. 282d87d79aeSPeter Wemm.It Fl f Ar file 283d87d79aeSPeter WemmRead the backup from 284d87d79aeSPeter Wemm.Ar file ; 285d87d79aeSPeter Wemm.Ar file 286d87d79aeSPeter Wemmmay be a special device file 287d87d79aeSPeter Wemmlike 28802344806SDavid E. O'Brien.Pa /dev/sa0 289d87d79aeSPeter Wemm(a tape drive), 290334f24bbSKris Kennaway.Pa /dev/da1c 291d87d79aeSPeter Wemm(a disk drive), 292d87d79aeSPeter Wemman ordinary file, 293d87d79aeSPeter Wemmor 294463cfa80SRuslan Ermilov.Sq Fl 295d87d79aeSPeter Wemm(the standard input). 2968fae3551SRodney W. GrimesIf the name of the file is of the form 2978fae3551SRodney W. Grimes.Dq host:file , 298d87d79aeSPeter Wemmor 299d87d79aeSPeter Wemm.Dq user@host:file , 3007c7fb079SRuslan Ermilov.Nm 3018fae3551SRodney W. Grimesreads from the named file on the remote host using 3028fae3551SRodney W. Grimes.Xr rmt 8 . 303c51d70c6SBrian Feldman.It Fl P Ar pipecommand 304c51d70c6SBrian FeldmanUse 305c51d70c6SBrian Feldman.Xr popen 3 306c51d70c6SBrian Feldmanto execute the 307c51d70c6SBrian Feldman.Xr sh 1 308c51d70c6SBrian Feldmanscript string defined by 309c51d70c6SBrian Feldman.Ar pipecommand 310c51d70c6SBrian Feldmanas the input for every volume in the backup. 311c51d70c6SBrian FeldmanThis child pipeline's 312c51d70c6SBrian Feldman.Dv stdout 313d04b5dfeSRuslan Ermilov.Pq Pa /dev/fd/1 314c51d70c6SBrian Feldmanis redirected to the 315c51d70c6SBrian Feldman.Nm 316c51d70c6SBrian Feldmaninput stream, and the environment variable 317c51d70c6SBrian Feldman.Ev RESTORE_VOLUME 318c51d70c6SBrian Feldmanis set to the current volume number being read. 319c51d70c6SBrian FeldmanThe 320c51d70c6SBrian Feldman.Ar pipecommand 321c51d70c6SBrian Feldmanscript is started each time a volume is loaded, as if it were a tape drive. 322d87d79aeSPeter Wemm.It Fl h 323d87d79aeSPeter WemmExtract the actual directory, 3248fae3551SRodney W. Grimesrather than the files that it references. 3258fae3551SRodney W. GrimesThis prevents hierarchical restoration of complete subtrees 3268fae3551SRodney W. Grimesfrom the dump. 327d87d79aeSPeter Wemm.It Fl m 328d87d79aeSPeter WemmExtract by inode numbers rather than by file name. 3298fae3551SRodney W. GrimesThis is useful if only a few files are being extracted, 3308fae3551SRodney W. Grimesand one wants to avoid regenerating the complete pathname 3318fae3551SRodney W. Grimesto the file. 33201696946SBill Swingle.It Fl N 33301696946SBill SwingleDo the extraction normally, but do not actually write any changes 334ef8f7ac9SSheldon Hearnto disk. 335ef8f7ac9SSheldon HearnThis can be used to check the integrity of dump media 33601696946SBill Swingleor other test purposes. 337d87d79aeSPeter Wemm.It Fl s Ar fileno 338d87d79aeSPeter WemmRead from the specified 339d87d79aeSPeter Wemm.Ar fileno 340d87d79aeSPeter Wemmon a multi-file tape. 341d87d79aeSPeter WemmFile numbering starts at 1. 34226408404SJordan K. Hubbard.It Fl u 34326408404SJordan K. HubbardWhen creating certain types of files, restore may generate a warning 34426408404SJordan K. Hubbarddiagnostic if they already exist in the target directory. 34526408404SJordan K. HubbardTo prevent this, the 34626408404SJordan K. Hubbard.Fl u 34726408404SJordan K. Hubbard(unlink) flag causes restore to remove old entries before attempting 34826408404SJordan K. Hubbardto create new ones. 3498b273fc8SKirk McKusickThis flag is recommended when using extended attributes 3508b273fc8SKirk McKusickto avoid improperly accumulating attributes on pre-existing files. 351d87d79aeSPeter Wemm.It Fl v 3528fae3551SRodney W. GrimesNormally 3537c7fb079SRuslan Ermilov.Nm 3548fae3551SRodney W. Grimesdoes its work silently. 3558fae3551SRodney W. GrimesThe 356d87d79aeSPeter Wemm.Fl v 3578fae3551SRodney W. Grimes(verbose) 358d87d79aeSPeter Wemmflag causes it to type the name of each file it treats 3598fae3551SRodney W. Grimespreceded by its file type. 360d87d79aeSPeter Wemm.It Fl y 361d87d79aeSPeter WemmDo not ask the user whether to abort the restore in the event of an error. 362d87d79aeSPeter WemmAlways try to skip over the bad block(s) and continue. 3638fae3551SRodney W. Grimes.El 3646087df9eSRuslan Ermilov.Sh ENVIRONMENT 3656087df9eSRuslan Ermilov.Bl -tag -width ".Ev TMPDIR" 3666087df9eSRuslan Ermilov.It Ev TAPE 3676087df9eSRuslan ErmilovDevice from which to read backup. 3686087df9eSRuslan Ermilov.It Ev TMPDIR 3696087df9eSRuslan ErmilovName of directory where temporary files are to be created. 3706087df9eSRuslan Ermilov.El 3716087df9eSRuslan Ermilov.Sh FILES 3726087df9eSRuslan Ermilov.Bl -tag -width "./restoresymtable" -compact 3736087df9eSRuslan Ermilov.It Pa /dev/sa0 3746087df9eSRuslan Ermilovthe default tape drive 3756087df9eSRuslan Ermilov.It Pa /tmp/rstdir* 3766087df9eSRuslan Ermilovfile containing directories on the tape. 3776087df9eSRuslan Ermilov.It Pa /tmp/rstmode* 3786087df9eSRuslan Ermilovowner, mode, and time stamps for directories. 3796087df9eSRuslan Ermilov.It Pa \&./restoresymtable 3806087df9eSRuslan Ermilovinformation passed between incremental restores. 3816087df9eSRuslan Ermilov.El 3828fae3551SRodney W. Grimes.Sh DIAGNOSTICS 383629e80efSPhilippe CharnierThe 384a5ef8459SDima Dorfman.Nm 385629e80efSPhilippe Charnierutility complains if it gets a read error. 3868fae3551SRodney W. GrimesIf 387d87d79aeSPeter Wemm.Fl y 3888fae3551SRodney W. Grimeshas been specified, or the user responds 3898fae3551SRodney W. Grimes.Ql y , 3907c7fb079SRuslan Ermilov.Nm 3918fae3551SRodney W. Grimeswill attempt to continue the restore. 3928fae3551SRodney W. Grimes.Pp 3938fae3551SRodney W. GrimesIf a backup was made using more than one tape volume, 3947c7fb079SRuslan Ermilov.Nm 3958fae3551SRodney W. Grimeswill notify the user when it is time to mount the next volume. 3968fae3551SRodney W. GrimesIf the 397d87d79aeSPeter Wemm.Fl x 3988fae3551SRodney W. Grimesor 399d87d79aeSPeter Wemm.Fl i 400d87d79aeSPeter Wemmflag has been specified, 4017c7fb079SRuslan Ermilov.Nm 4028fae3551SRodney W. Grimeswill also ask which volume the user wishes to mount. 4038fae3551SRodney W. GrimesThe fastest way to extract a few files is to 4048fae3551SRodney W. Grimesstart with the last volume, and work towards the first volume. 4058fae3551SRodney W. Grimes.Pp 4068fae3551SRodney W. GrimesThere are numerous consistency checks that can be listed by 4077c7fb079SRuslan Ermilov.Nm . 4088fae3551SRodney W. GrimesMost checks are self-explanatory or can ``never happen''. 4098fae3551SRodney W. GrimesCommon errors are given below. 4108fae3551SRodney W. Grimes.Pp 4118fae3551SRodney W. Grimes.Bl -tag -width Ds -compact 4128fae3551SRodney W. Grimes.It <filename>: not found on tape 4138fae3551SRodney W. GrimesThe specified file name was listed in the tape directory, 4148fae3551SRodney W. Grimesbut was not found on the tape. 4158fae3551SRodney W. GrimesThis is caused by tape read errors while looking for the file, 4168fae3551SRodney W. Grimesand from using a dump tape created on an active file system. 4178fae3551SRodney W. Grimes.Pp 4188fae3551SRodney W. Grimes.It expected next file <inumber>, got <inumber> 4198fae3551SRodney W. GrimesA file that was not listed in the directory showed up. 4208fae3551SRodney W. GrimesThis can occur when using a dump created on an active file system. 4218fae3551SRodney W. Grimes.Pp 4228fae3551SRodney W. Grimes.It Incremental dump too low 4238fae3551SRodney W. GrimesWhen doing incremental restore, 4248fae3551SRodney W. Grimesa dump that was written before the previous incremental dump, 4258fae3551SRodney W. Grimesor that has too low an incremental level has been loaded. 4268fae3551SRodney W. Grimes.Pp 4278fae3551SRodney W. Grimes.It Incremental dump too high 4288fae3551SRodney W. GrimesWhen doing incremental restore, 4298fae3551SRodney W. Grimesa dump that does not begin its coverage where the previous incremental 4308fae3551SRodney W. Grimesdump left off, 4318fae3551SRodney W. Grimesor that has too high an incremental level has been loaded. 4328fae3551SRodney W. Grimes.Pp 4338fae3551SRodney W. Grimes.It Tape read error while restoring <filename> 4348fae3551SRodney W. Grimes.It Tape read error while skipping over inode <inumber> 4358fae3551SRodney W. Grimes.It Tape read error while trying to resynchronize 4368fae3551SRodney W. GrimesA tape (or other media) read error has occurred. 4378fae3551SRodney W. GrimesIf a file name is specified, 4388fae3551SRodney W. Grimesthen its contents are probably partially wrong. 4398fae3551SRodney W. GrimesIf an inode is being skipped or the tape is trying to resynchronize, 4408fae3551SRodney W. Grimesthen no extracted files have been corrupted, 4418fae3551SRodney W. Grimesthough files may not be found on the tape. 4428fae3551SRodney W. Grimes.Pp 4438fae3551SRodney W. Grimes.It resync restore, skipped <num> blocks 4448fae3551SRodney W. GrimesAfter a dump read error, 4457c7fb079SRuslan Ermilov.Nm 4468fae3551SRodney W. Grimesmay have to resynchronize itself. 4478fae3551SRodney W. GrimesThis message lists the number of blocks that were skipped over. 4488fae3551SRodney W. Grimes.El 4498fae3551SRodney W. Grimes.Sh SEE ALSO 4508fae3551SRodney W. Grimes.Xr dump 8 , 4518fae3551SRodney W. Grimes.Xr mount 8 , 452af202156SWolfram Schneider.Xr newfs 8 , 4538fae3551SRodney W. Grimes.Xr rmt 8 4546087df9eSRuslan Ermilov.Sh HISTORY 4556087df9eSRuslan ErmilovThe 4566087df9eSRuslan Ermilov.Nm 4576087df9eSRuslan Ermilovutility appeared in 4586087df9eSRuslan Ermilov.Bx 4.2 . 4598fae3551SRodney W. Grimes.Sh BUGS 460629e80efSPhilippe CharnierThe 461629e80efSPhilippe Charnier.Nm 462629e80efSPhilippe Charnierutility can get confused when doing incremental restores from 463325301a7SRuslan Ermilovdumps that were made on active file systems without the 464325301a7SRuslan Ermilov.Fl L 465325301a7SRuslan Ermilovoption (see 466325301a7SRuslan Ermilov.Xr dump 8 ) . 4678fae3551SRodney W. Grimes.Pp 4688fae3551SRodney W. GrimesA level zero dump must be done after a full restore. 4698fae3551SRodney W. GrimesBecause restore runs in user code, 4708fae3551SRodney W. Grimesit has no control over inode allocation; 47165f2c37bSJoerg Wunschthus a full dump must be done to get a new set of directories 4728fae3551SRodney W. Grimesreflecting the new inode numbering, 4738fae3551SRodney W. Grimeseven though the contents of the files is unchanged. 4742af23c90SEivind Eklund.Pp 4759806e231SRuslan ErmilovTo do a network restore, you have to run restore as root. 4769806e231SRuslan ErmilovThis is due 4779806e231SRuslan Ermilovto the previous security history of dump and restore. 4789806e231SRuslan Ermilov(restore is 4792af23c90SEivind Eklundwritten to be setuid root, but we are not certain all bugs are gone 4802af23c90SEivind Eklundfrom the restore code - run setuid at your own risk.) 481d84f2470SSheldon Hearn.Pp 482d84f2470SSheldon HearnThe temporary files 483d84f2470SSheldon Hearn.Pa /tmp/rstdir* 484d84f2470SSheldon Hearnand 485d84f2470SSheldon Hearn.Pa /tmp/rstmode* 486d84f2470SSheldon Hearnare generated with a unique name based on the date of the dump 487d84f2470SSheldon Hearnand the process ID (see 488d84f2470SSheldon Hearn.Xr mktemp 3 ) , 489d84f2470SSheldon Hearnexcept for when 490d84f2470SSheldon Hearn.Fl r 491d84f2470SSheldon Hearnor 492d84f2470SSheldon Hearn.Fl R 493d84f2470SSheldon Hearnis used. 494d84f2470SSheldon HearnBecause 495d84f2470SSheldon Hearn.Fl R 496d84f2470SSheldon Hearnallows you to restart a 497d84f2470SSheldon Hearn.Fl r 498d84f2470SSheldon Hearnoperation that may have been interrupted, the temporary files should 499d84f2470SSheldon Hearnbe the same across different processes. 500d84f2470SSheldon HearnIn all other cases, the files are unique because it is possible to 501d84f2470SSheldon Hearnhave two different dumps started at the same time, and separate 5020227791bSRuslan Ermilovoperations should not conflict with each other. 503