summaryrefslogtreecommitdiffstats
path: root/sbin/restore
Commit message (Collapse)AuthorAgeFilesLines
* Address a few minor style and consistency issues in revision 1.32.iedowse2002-05-061-23/+15
| | | | Submitted by: Joshua Goodall <joshua@roughtrade.net>
* Set the permissions on restored symbolic links.iedowse2002-05-021-1/+19
| | | | | PR: bin/37665 Submitted by: "Michael C. Adler" <mad1@tapil.com>
* Replaced exists() tests with two equivalent defined().ru2002-04-181-1/+1
| | | | | LIBDIR is defined in bsd.own.mk but sys.mk no longer includes bsd.own.mk as of revision 1.60.
* restore(8) manual page does not explain rrestore.trhodes2002-04-121-0/+4
| | | | | PR: 34234 Submitted by: Gary W. Swearingen <swear@blarg.net>
* o remove __Pimp2002-03-208-385/+221
| | | | | o Use ANSI function definitions o unifdef -D__STDC__
* Remove 'register' keyword.obrien2002-03-206-77/+77
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Use a more robust scheme for determining how many blocks to skipiedowse2002-02-181-15/+18
| | | | | | | | | after an EOT-terminated volume. We keep track of the current record number, and synchronise it with the c_tapea field each time we read a header. Avoid the use of c_firstrec because some bugs in dump can cause it to be set incorrectly. Move the initialisation of some variables to avoid compiler warnings.
* When we reach the end of the dump in findinode(), ask for anotheriedowse2002-02-181-9/+19
| | | | | | | | | | volume if we missed some earlier tapes (the user can still enter 'none' later if the tapes are unavailable). Previously with 'x' restores, we might not ask for all tapes if the tapes are supplied in reverse order. Clarify the message that describes what volume should be mounted first; reverse order is only efficient when extracting a few files.
* In createfiles(), properly handle a number of cases where no furtheriedowse2002-02-141-16/+24
| | | | | | | | | | | | | | | | | | | | | volumes are available, instead of getting stuck in a loop calling getvol(). Normally restore in 'x' or 'i' modes will ask for a new (earlier) volume when the current inode number on the tape is greater than the last inode to be restored, since there can be no further inodes of interest on that volume. However we don't want to change volumes in this case either if the user explicitly said that there are no more tapes, or if we are looking at the first volume. When no more volumes are available but there are still inodes that we have not found, we now just fall through to the code that prints out a list of any missing files, so the restore completes normally. Also simplify the logic a bit by always returning to the start of the main for(;;) loop whenever the volume has changed. This should completely fix the "Changing volumes on pipe input" bug that is often observed when restoring dumps of active filesystems. PR: bin/4176, bin/34604, misc/34675
* Fix a number of long-standing restore bugs in tape.c, mainly relatingiedowse2002-02-131-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | to multi-volume restores: - In findinode(), keep a copy of header->c_type so that we don't exit the do-while loop until we have processed the current header. Exiting too early leaves curfile.ino set to 0, which confuses the logic in createfiles(), so multi-volume restores with the 'x' command don't work if you follow the instructions and supply the tapes in reverse order. This appears to have been broken by CSRG revision 5.33 tape.c (Oct 1992). - The logic in getvol() for deciding how many records to skip after the volume header was confused; sometimes it would skip too few records and sometimes too many, leading to "resync restore" warnings and missing files. Skip to the next header only when the current action is not `USING'. Work around a dump bug that sets c_count incorrectly in the volume header of the first tape. Some of the problems here date back to at least 1991. - Back out revision 1.23. This appeared to avoid warnings about missing files in the 'rN' verification case, but it made the problems with the 'x' command worse by stopping getvol() from even attempting to find the first inode number on the newly inserted tape. The bug it addressed is fixed by correcting the skipping logic as described above. - Save the value of `tpblksread' in case the wrong volume is supplied, because it is incremented each time we read a volume header. We already saved `blksread' for the same reson.
* Don't refer to findinode()'s `complain' parameter in a comment; itiedowse2002-02-121-1/+1
| | | | was removed in 1986.
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-9/+9
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Fix a bug where restore(8) segfaults while trying to restore on atobez2001-10-301-0/+1
| | | | | | | | read-only FS. Reviewed by: audit silence Approved by: markm MFC after: 2 weeks
* Make the protocol/dumprestore.h header match restore's idea of the dumpdillon2001-10-281-9/+13
| | | | | | | | header for the case where sizeof(time_t) != sizeof(int). dumprestore.h was embedding time_t when it should have been embedding int32_t. Use time_to_time32() and time32_to_time() to convert between the protocoll/file-format time and time_t.
* Documentation fixes:cjc2001-10-022-10/+12
| | | | | | | - The '-d' option was not documented on the manpage or in the usage message. - The '-N' option was not included in the usage.
* restore(8) doesn't need to be setgid `tty', and never did.ru2001-08-301-2/+0
| | | | | | | | | At the times, restore(8) and rrestore(8) were the different utilities. rrestore(8) was installed setuid `root', while restore(8) with usual ownership and privileges. Later on, on August 28, 1991 (what a coincidence!), rrestore(8) code was merged with restore(8). The setgid `tty' bit then was accidentally put.
* Fix grammar.dd2001-08-201-1/+2
|
* Respect the -N flag when changing directory attributes in setdirmode).dd2001-08-201-4/+6
| | | | | PR: 29671 Submitted by: Sascha Blank <sblank@addcom.de>
* Silence non-constant format string warnings by marking functionskris2001-08-191-2/+2
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* Honour `TMPDIR' environment variable.sobomax2001-08-131-3/+9
| | | | | | Reviewed by: ru Approved by: ru MFC after: 2 weeks
* Remove whitespace at EOL.dd2001-07-151-13/+13
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Include missing header files which define functions for which gcc hasdd2001-06-242-0/+2
| | | | builtins (e.g., exit, strcmp).
* Document the interactive command `what'.mikeh2001-06-201-0/+4
| | | | | Reviewed by: ru MFC after: 2 weeks
* Add 'SKIP' as an action so that verification works for multivolume restores.mjacob2001-06-111-1/+1
| | | | | | | | Tested with filesystem files. PR: 27218 Submitted by: mad1@tapil.com MFC after: 3 weeks
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* bye-bye documented raw deviceobrien2001-03-091-3/+3
|
* Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,obrien2001-03-084-46/+3
| | | | and remove leading `r'(aw) from it.
* mdoc(7) police: use the default ``file ...'' feature of the .Ar macro.ru2001-02-131-2/+2
|
* Prepare for mdoc(7)NG.ru2001-01-161-1/+1
|
* Prepare for mdoc(7)NG.ru2000-12-181-1/+1
|
* Stop restore from looping under certain error conditions. Thisiedowse2000-12-123-15/+16
| | | | | | | | | corrects cases where restore would spew an infinite stream of "Changing volumes on pipe input?" messages, or would loop waiting for a response to the "set owner/mode for '.'" question. PR: bin/14250 Reviewed by: dwmalone
* Don't give up on file write errors. Just log them and continue.mckusick2000-12-121-1/+0
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-21/+21
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-1/+0
|
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-102-0/+3
| | | | <time.h>).
* Fix sign extension.mjacob2000-09-121-1/+1
| | | | | PR: 21232 Obtained from: Christian Weisgerber <naddy@mips.inka.de>
* Add text from NetBSD's rev 1.12 which should have accompaniedsheldonh2000-08-111-0/+22
| | | | | | | the changes made to our own source on 1997-01-01. PR: 20445 Submitted by: Jon Masami Kuroda <jkuroda@eecs.berkeley.edu>
* Don't try to make files immutable (ie. chflags) before setting access times.dwmalone2000-07-162-4/+4
| | | | | | PR: 19973 Submitted by: Arjan de Vet <Arjan.deVet@adv.iae.nl> Reviewed by: Matthew Jacob <mjacob@feral.com>
* Update references to disk and tape devices.kris2000-05-071-5/+5
|
* Remove single-space hard sentence breaks. These degrade the qualitysheldonh2000-03-011-2/+4
| | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc.
* Remove xrefs to obsolete ft driver.nik2000-03-011-1/+0
| | | | | PR: docs/17080 Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de>
* Use libcrypto instead of libdes.markm2000-02-241-1/+2
|
* Committed changes to restore(8) for previously undocumented -N option.unfurl2000-02-171-5/+9
| | | | | PR: 15600 Reviewed by: jim
* Add `.Nm rrestore' to NAME section.phantom2000-01-101-1/+2
|
* Prepare for K5.markm1999-09-201-1/+1
|
* Fix for new KerberosFix for new Kerberos44markm1999-09-191-0/+1
|
* $Id$ -> $FreeBSD$peter1999-08-2810-10/+10
|
OpenPOWER on IntegriCloud