-$Id: CHANGES,v 1.155 2002/01/11 08:54:12 stelian Exp $
+$Id: CHANGES,v 1.156 2002/01/16 10:29:23 stelian Exp $
Changes between versions 0.4b26 and 0.4b27 (released ???????????????)
=====================================================================
3. Detailed the manual entry for the -N option of restore.
+4. Added the -a flag to restore to make able doing unattended
+ restores in -i or -x mode (automatically walks through the
+ multiple dump volumes).
+
Changes between versions 0.4b25 and 0.4b26 (released January 7, 2002)
=====================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.34 2002/01/16 09:32:14 stelian Exp $";
+ "$Id: main.c,v 1.35 2002/01/16 10:29:26 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include "restore.h"
#include "extern.h"
-int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
+int aflag = 0, bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
int hflag = 1, mflag = 1, Mflag = 0, Nflag = 0, Vflag = 0, zflag = 0;
int uflag = 0, lflag = 0, Lflag = 0;
int dokerberos = 0;
;
obsolete(&argc, &argv);
while ((ch = getopt(argc, argv,
- "b:CcdD:f:F:hi"
+ "ab:CcdD:f:F:hi"
#ifdef KERBEROS
"k"
#endif
#endif
"Rrs:tT:uvVxX:y")) != -1)
switch(ch) {
+ case 'a':
+ aflag = 1;
+ break;
case 'b':
/* Change default tape blocksize. */
bflag = 1;
* Incremental restoration of a file system.
*/
case 'r':
+ aflag = 1; /* in -r or -R mode, -a is default */
setup();
if (dumptime > 0) {
/*
* Resume an incremental file system restoration.
*/
case 'R':
+ aflag = 1; /* in -r or -R mode, -a is default */
initsymtable(symtbl);
skipmaps();
skipdirs();
(void)fprintf(stderr,
"usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
__progname, " -C [-c" kerbflag "lMvVy] [-b blocksize] [-D filesystem] [-f file] [-F script] [-L limit] [-s fileno]",
- __progname, " -i [-ch" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
+ __progname, " -i [-ach" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
__progname, " -r [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
__progname, " -R [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
__progname, " -t [-ch" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]",
- __progname, " -x [-ch" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]");
+ __progname, " -x [-ach" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]");
exit(1);
}
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: restore.8.in,v 1.21 2002/01/16 09:32:14 stelian Exp $
+.\" $Id: restore.8.in,v 1.22 2002/01/16 10:29:26 stelian Exp $
.\"
.Dd __DATE__
.Dt RESTORE 8
.Op Fl T Ar directory
.Nm restore
.Fl i
-.Op Fl chklmMNuvVy
+.Op Fl achklmMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op file ...
.Nm restore
.Fl x
-.Op Fl chklmMNuvVy
+.Op Fl achklmMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Pp
The following additional options may be specified:
.Bl -tag -width Ds
+.It Fl a
+In
+.Fl i
+or
+.Fl x
+mode,
+.Nm restore
+does ask the user for the volume number on which the files to
+be extracted are supposed to be (in order to minimise the time
+be reading only the interesting volumes). The
+.Fl a
+option disables this behaviour and reads all the volumes starting
+with 1. This option is useful when the operator does not know on which
+volume the files to be extracted are and/or when he prefers the
+longer unattended mode rather than the shorter interactive mode.
.It Fl b Ar blocksize
The number of kilobytes per dump record.
If the
* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
*
- * $Id: restore.h,v 1.22 2002/01/16 09:32:14 stelian Exp $
+ * $Id: restore.h,v 1.23 2002/01/16 10:29:26 stelian Exp $
*/
/*
/*
* Flags
*/
+extern int aflag; /* automatic volume increment */
extern int cvtflag; /* convert from old to new tape format */
extern int bflag; /* set input block size */
extern int dflag; /* print out debugging info */
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.52 2002/01/16 09:32:14 stelian Exp $";
+ "$Id: tape.c,v 1.53 2002/01/16 10:29:26 stelian Exp $";
#endif /* not lint */
#include <config.h>
again:
if (pipein)
exit(1); /* pipes do not get a second chance */
- if (command == 'R' || command == 'r' || curfile.action != SKIP) {
+ if (aflag || curfile.action != SKIP) {
newvol = nextvol;
wantnext = 1;
} else {