use _PATH_DEFTAPE from <paths.h> instead of "pathnames.h"
cleanup references/examples to use /dev/rst* instead of /dev/rmt* minor .Nm usage cleanup in man page
This commit is contained in:
parent
ac4989250c
commit
ceb1313a6a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dirs.c,v 1.22 1997/03/19 08:42:51 lukem Exp $ */
|
||||
/* $NetBSD: dirs.c,v 1.23 1997/04/15 07:12:19 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -42,7 +42,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: dirs.c,v 1.22 1997/03/19 08:42:51 lukem Exp $";
|
||||
static char rcsid[] = "$NetBSD: dirs.c,v 1.23 1997/04/15 07:12:19 lukem Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -57,6 +57,7 @@ static char rcsid[] = "$NetBSD: dirs.c,v 1.22 1997/03/19 08:42:51 lukem Exp $";
|
|||
#include <protocols/dumprestore.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <paths.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -64,7 +65,6 @@ static char rcsid[] = "$NetBSD: dirs.c,v 1.22 1997/03/19 08:42:51 lukem Exp $";
|
|||
|
||||
#include <machine/endian.h>
|
||||
|
||||
#include "pathnames.h"
|
||||
#include "restore.h"
|
||||
#include "extern.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $ */
|
||||
/* $NetBSD: main.c,v 1.12 1997/04/15 07:12:21 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -43,7 +43,7 @@ static char copyright[] =
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 9/13/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $";
|
||||
static char rcsid[] = "$NetBSD: main.c,v 1.12 1997/04/15 07:12:21 lukem Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -56,12 +56,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"
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* $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"
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: restore.8,v 1.13 1996/12/24 02:32:25 mikel Exp $
|
||||
.\" $NetBSD: restore.8,v 1.14 1997/04/15 07:12:23 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1985, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -80,7 +80,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
|
||||
|
@ -88,7 +88,7 @@ subsequent incremental backups layered on top of it.
|
|||
Single files and
|
||||
directory subtrees may be restored from full or partial
|
||||
backups.
|
||||
.Nm Restore
|
||||
.Nm
|
||||
works across a network;
|
||||
to do this see the
|
||||
.Fl f
|
||||
|
@ -106,7 +106,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;
|
||||
|
@ -140,7 +140,7 @@ those files that are not needed.
|
|||
.It Ic extract
|
||||
All the files that are on the extraction list are extracted
|
||||
from the dump.
|
||||
.Nm Restore
|
||||
.Nm
|
||||
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.
|
||||
|
@ -170,11 +170,11 @@ 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
|
||||
.Nm Restore
|
||||
.Nm
|
||||
requests a particular tape of a multi volume set on which to restart
|
||||
a full restore
|
||||
(see the
|
||||
|
@ -207,7 +207,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
|
||||
|
@ -215,7 +215,7 @@ restore passes.
|
|||
This file should be removed when the last incremental has been
|
||||
restored.
|
||||
.Pp
|
||||
.Nm Restore ,
|
||||
.Nm restore ,
|
||||
in conjunction with
|
||||
.Xr newfs 8
|
||||
and
|
||||
|
@ -264,11 +264,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
|
||||
|
@ -280,7 +280,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),
|
||||
|
@ -292,7 +292,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
|
||||
|
@ -313,7 +313,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
|
||||
|
@ -330,18 +330,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.
|
||||
|
@ -389,13 +389,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
|
||||
|
@ -412,12 +412,14 @@ information passed between incremental restores.
|
|||
.Xr mount 8 ,
|
||||
.Xr rmt 8
|
||||
.Sh BUGS
|
||||
.Nm Restore
|
||||
.Nm
|
||||
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,
|
||||
|
@ -446,6 +448,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 .
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tape.c,v 1.25 1997/03/19 08:42:55 lukem Exp $ */
|
||||
/* $NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -42,7 +42,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tape.c 8.6 (Berkeley) 9/13/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: tape.c,v 1.25 1997/03/19 08:42:55 lukem Exp $";
|
||||
static char rcsid[] = "$NetBSD: tape.c,v 1.26 1997/04/15 07:12:25 lukem Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -56,6 +56,7 @@ static char rcsid[] = "$NetBSD: tape.c,v 1.25 1997/03/19 08:42:55 lukem Exp $";
|
|||
#include <protocols/dumprestore.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <paths.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -64,7 +65,6 @@ static char rcsid[] = "$NetBSD: tape.c,v 1.25 1997/03/19 08:42:55 lukem Exp $";
|
|||
|
||||
#include "restore.h"
|
||||
#include "extern.h"
|
||||
#include "pathnames.h"
|
||||
|
||||
static long fssize = MAXBSIZE;
|
||||
static int mt = -1;
|
||||
|
|
Loading…
Reference in New Issue