diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-16 04:07:41 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-16 04:07:41 +0000 |
commit | 71e467609aa8b850b392510d049e8a79664efedc (patch) | |
tree | 870c5ee3d37e260b8992b0f4043e9a224c3e4d3f | |
parent | 61827af41d7d7d18bcad7d8ddb1a8d88f40feffe (diff) |
No need for "pathnames.h" now that _PATH_DEFTAPE is in <paths.h>
Fix rmt -> rst in man page and change ".Nm restore" -> ".Nm"
-rw-r--r-- | sbin/restore/dirs.c | 6 | ||||
-rw-r--r-- | sbin/restore/main.c | 4 | ||||
-rw-r--r-- | sbin/restore/pathnames.h | 46 | ||||
-rw-r--r-- | sbin/restore/restore.8 | 48 | ||||
-rw-r--r-- | sbin/restore/tape.c | 4 |
5 files changed, 32 insertions, 76 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 292e82833d7..5284fd6f0d2 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dirs.c,v 1.12 1996/12/24 08:37:50 deraadt Exp $ */ +/* $OpenBSD: dirs.c,v 1.13 1997/04/16 04:07:35 millert Exp $ */ /* $NetBSD: dirs.c,v 1.16 1995/06/19 00:20:11 cgd Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94"; #else -static char rcsid[] = "$OpenBSD: dirs.c,v 1.12 1996/12/24 08:37:50 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dirs.c,v 1.13 1997/04/16 04:07:35 millert Exp $"; #endif #endif /* not lint */ @@ -58,6 +58,7 @@ static char rcsid[] = "$OpenBSD: dirs.c,v 1.12 1996/12/24 08:37:50 deraadt Exp $ #include <protocols/dumprestore.h> #include <errno.h> +#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -65,7 +66,6 @@ static char rcsid[] = "$OpenBSD: dirs.c,v 1.12 1996/12/24 08:37:50 deraadt Exp $ #include <machine/endian.h> -#include "pathnames.h" #include "restore.h" #include "extern.h" diff --git a/sbin/restore/main.c b/sbin/restore/main.c index 33ccc60af92..2963bac8a7c 100644 --- a/sbin/restore/main.c +++ b/sbin/restore/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 1997/01/15 23:41:38 millert Exp $ */ +/* $OpenBSD: main.c,v 1.7 1997/04/16 04:07:37 millert Exp $ */ /* $NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $ */ /* @@ -57,12 +57,12 @@ static char rcsid[] = "$NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $"; #include <err.h> #include <errno.h> +#include <paths.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "pathnames.h" #include "restore.h" #include "extern.h" diff --git a/sbin/restore/pathnames.h b/sbin/restore/pathnames.h deleted file mode 100644 index c66392458a1..00000000000 --- a/sbin/restore/pathnames.h +++ /dev/null @@ -1,46 +0,0 @@ -/* $OpenBSD: pathnames.h,v 1.2 1996/06/23 14:32:16 deraadt Exp $ */ -/* $NetBSD: pathnames.h,v 1.6 1995/03/18 14:59:48 cgd Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)pathnames.h 8.2 (Berkeley) 1/21/94 - */ - -#include <paths.h> - -#define _PATH_DEFTAPE "/dev/rmt8" diff --git a/sbin/restore/restore.8 b/sbin/restore/restore.8 index 846924abbe0..2af517062f0 100644 --- a/sbin/restore/restore.8 +++ b/sbin/restore/restore.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: restore.8,v 1.5 1996/12/24 02:40:53 deraadt Exp $ +.\" $OpenBSD: restore.8,v 1.6 1997/04/16 04:07:39 millert Exp $ .\" $NetBSD: restore.8,v 1.11 1996/02/02 22:29:33 phil Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 @@ -41,32 +41,32 @@ .Nm restore .Nd "restore files or file systems from backups made with dump" .Sh SYNOPSIS -.Nm restore +.Nm .Fl i .Op Fl chmvy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl s Ar fileno -.Nm restore +.Nm .Fl R .Op Fl cvy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl s Ar fileno -.Nm restore +.Nm .Fl r .Op Fl cvy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl s Ar fileno -.Nm restore +.Nm .Fl t .Op Fl chvy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl s Ar fileno .Op file ... -.Nm restore +.Nm .Fl x .Op Fl chmvy .Op Fl b Ar blocksize @@ -81,7 +81,7 @@ option syntax is implemented for backward compatibility, but is not documented here.) .Sh DESCRIPTION The -.Nm restore +.Nm command performs the inverse function of .Xr dump 8 . A full backup of a file system may be restored and @@ -107,7 +107,7 @@ Exactly one of the following flags is required: .It Fl i This mode allows interactive restoration of files from a dump. After reading in the directory information from the dump, -.Nm restore +.Nm provides a shell like interface that allows the user to move around the directory tree selecting files to be extracted. The available commands are given below; @@ -171,7 +171,7 @@ When set, the verbose flag causes the .Ic ls command to list the inode numbers of all entries. It also causes -.Nm restore +.Nm to print out information about each file as it is extracted. .El .It Fl R @@ -208,7 +208,7 @@ restore rf /dev/rst8 .Ed .Pp Note that -.Nm restore +.Nm leaves a file .Pa restoresymtable in the root directory to pass information between incremental @@ -265,11 +265,11 @@ The number of kilobytes per dump record. If the .Fl b option is not specified, -.Nm restore +.Nm tries to determine the block size dynamically. .It Fl c Normally, -.Nm restore +.Nm will try to determine dynamically whether the dump was made from an old (pre-4.4) or new format file sytem. The .Fl c @@ -281,7 +281,7 @@ Read the backup from .Ar file may be a special device file like -.Pa /dev/rmt12 +.Pa /dev/rst0 (a tape drive), .Pa /dev/rsd1c (a disk drive), @@ -293,7 +293,7 @@ If the name of the file is of the form .Dq host:file , or .Dq user@host:file , -.Nm restore +.Nm reads from the named file on the remote host using .Xr rmt 8 . .Pp @@ -314,7 +314,7 @@ on a multi-file tape. File numbering starts at 1. .It Fl v Normally -.Nm restore +.Nm does its work silently. The .Fl v @@ -331,18 +331,18 @@ If .Fl y has been specified, or the user responds .Ql y , -.Nm restore +.Nm will attempt to continue the restore. .Pp If a backup was made using more than one tape volume, -.Nm restore +.Nm will notify the user when it is time to mount the next volume. If the .Fl x or .Fl i flag has been specified, -.Nm restore +.Nm will also 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. @@ -390,13 +390,13 @@ though files may not be found on the tape. .Pp .It resync restore, skipped <num> blocks After a dump read error, -.Nm restore +.Nm may have to resynchronize itself. This message lists the number of blocks that were skipped over. .El .Sh FILES .Bl -tag -width "./restoresymtable" -compact -.It Pa /dev/rmt8 +.It Pa /dev/rst0 the default tape drive .It Pa /dev/rst* Raw SCSI tape interface @@ -418,11 +418,13 @@ 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, +Because +.Nm +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* @@ -447,6 +449,6 @@ have two different dumps started at the same time, and separate operations shouldn't conflict with each other. .Sh HISTORY The -.Nm restore +.Nm command appeared in .Bx 4.2 . diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c index 1c0a6574952..17c5b7b7075 100644 --- a/sbin/restore/tape.c +++ b/sbin/restore/tape.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tape.c,v 1.7 1997/01/27 09:33:08 downsj Exp $ */ +/* $OpenBSD: tape.c,v 1.8 1997/04/16 04:07:40 millert Exp $ */ /* $NetBSD: tape.c,v 1.22 1996/11/30 18:31:29 cgd Exp $ */ /* @@ -57,6 +57,7 @@ static char rcsid[] = "$NetBSD: tape.c,v 1.22 1996/11/30 18:31:29 cgd Exp $"; #include <protocols/dumprestore.h> #include <errno.h> +#include <paths.h> #include <setjmp.h> #include <stdio.h> #include <stdlib.h> @@ -65,7 +66,6 @@ static char rcsid[] = "$NetBSD: tape.c,v 1.22 1996/11/30 18:31:29 cgd Exp $"; #include "restore.h" #include "extern.h" -#include "pathnames.h" static long fssize = MAXBSIZE; static int mt = -1; |