From: Stelian Pop Date: Wed, 5 Jun 2002 13:29:12 +0000 (+0000) Subject: Documented the -d option in restore. X-Git-Tag: release_0_4b29~2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=fceb4f25728fd34fabfad406c32c5d8c142aae90;p=dump.git Documented the -d option in restore. Added a -v (verbose) mode to dump. --- diff --git a/CHANGES b/CHANGES index 1fbab6f..d7dd61d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.177 2002/05/21 15:48:44 stelian Exp $ +$Id: CHANGES,v 1.178 2002/06/05 13:29:12 stelian Exp $ Changes between versions 0.4b28 and 0.4b29 (released ??????????????) ==================================================================== @@ -28,9 +28,15 @@ Changes between versions 0.4b28 and 0.4b29 (released ??????????????) which makes one able to pipe the output of dump, by the net, to a remote CD-burner server. -5. Make dump use O_CREAT|O_TRUNC both locally and remotely (over rmt), and - use GNU's symbolic syntax over rmt instead of numerical values to assure - multiple platform compatibility. +5. Made dump use O_CREAT|O_TRUNC both locally and remotely (over rmt), + and use GNU's symbolic syntax over rmt instead of numerical values + to assure multiple platform compatibility. + +6. Documented the -d option in restore. + +7. Added a -v (verbose) mode to dump. For now it just prints the number + of the inode being dumped, but this could evolve in future versions + to include interesting debugging output. Changes between versions 0.4b27 and 0.4b28 (released April 12, 2002) ==================================================================== diff --git a/dump/dump.8.in b/dump/dump.8.in index 657f780..455f8c0 100644 --- a/dump/dump.8.in +++ b/dump/dump.8.in @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dump.8.in,v 1.40 2002/04/04 08:20:23 stelian Exp $ +.\" $Id: dump.8.in,v 1.41 2002/06/05 13:29:15 stelian Exp $ .\" .Dd __DATE__ .Dt DUMP 8 @@ -40,7 +40,7 @@ .Nd ext2 filesystem backup .Sh SYNOPSIS .Nm dump -.Op Fl 0123456789ackMnqSu +.Op Fl 0123456789ackMnqSuv .Op Fl A Ar file .Op Fl B Ar records .Op Fl b Ar blocksize @@ -379,6 +379,12 @@ The file .Pa __DUMPDATES__ may be edited to change any of the fields, if necessary. +.It Fl v +The +.Fl v +(verbose) makes +.Nm dump +to print extra information which could be helpful in debug sessions. .It Fl W .Nm Dump tells the operator what file systems need to be dumped. diff --git a/dump/dump.h b/dump/dump.h index a392aac..e6d8e13 100644 --- a/dump/dump.h +++ b/dump/dump.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - AlcĂ´ve , 2000-2002 * - * $Id: dump.h,v 1.38 2002/05/21 15:48:46 stelian Exp $ + * $Id: dump.h,v 1.39 2002/06/05 13:29:15 stelian Exp $ */ /*- @@ -82,6 +82,7 @@ extern int uflag; /* update flag */ extern int mflag; /* dump metadata only if possible flag */ extern int Mflag; /* multi-volume flag */ extern int qflag; /* quit on errors flag */ +extern int vflag; /* verbose flag */ extern int breademax; /* maximum number of bread errors before we quit */ extern char *eot_script; /* end of volume script fiag */ extern int diskfd; /* disk file descriptor */ diff --git a/dump/main.c b/dump/main.c index 93c175c..173ec03 100644 --- a/dump/main.c +++ b/dump/main.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.71 2002/04/04 08:20:23 stelian Exp $"; + "$Id: main.c,v 1.72 2002/06/05 13:29:15 stelian Exp $"; #endif /* not lint */ #include @@ -111,6 +111,7 @@ int uflag; /* update flag */ int mflag; /* dump metadata only if possible */ int Mflag; /* multi-volume flag */ int qflag; /* quit on errors flag */ +int vflag; /* verbose flag */ int breademax = 32; /* maximum number of bread errors before we quit */ char *eot_script; /* end of volume script fiag */ int diskfd; /* disk file descriptor */ @@ -255,7 +256,7 @@ main(int argc, char *argv[]) #ifdef USE_QFA "Q:" #endif - "s:ST:uWw" + "s:ST:uvWw" #ifdef HAVE_ZLIB "z::" #endif @@ -427,6 +428,10 @@ main(int argc, char *argv[]) uflag = 1; break; + case 'v': /* verbose */ + vflag = 1; + break; + case 'W': /* what to do */ case 'w': lastdump(ch); @@ -916,6 +921,8 @@ main(int argc, char *argv[]) */ if (dp->di_nlink == 0 || dp->di_dtime != 0) continue; + if (vflag) + msg("dumping directory inode %lu\n", ino); (void)dumpdirino(dp, ino); #else (void)dumpino(dp, ino); @@ -942,6 +949,12 @@ main(int argc, char *argv[]) * inodes since this is done in dumpino(). */ #endif + if (vflag) { + if (mflag && TSTINO(ino, metainomap)) + msg("dumping regular inode %lu (meta only)\n", ino); + else + msg("dumping regular inode %lu\n", ino); + } (void)dumpino(dp, ino, mflag && TSTINO(ino, metainomap)); } @@ -1025,7 +1038,7 @@ usage(void) #ifdef KERBEROS "k" #endif - "mMnqSu" + "mMnqSuv" "] [-A file] [-B records] [-b blocksize]\n" "\t%s [-d density] [-e inode#,inode#,...] [-E file] [-f file]\n" "\t%s [-h level] [-I nr errors] " diff --git a/restore/main.c b/restore/main.c index eef486a..dc875be 100644 --- a/restore/main.c +++ b/restore/main.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.38 2002/02/04 11:18:46 stelian Exp $"; + "$Id: main.c,v 1.39 2002/06/05 13:29:15 stelian Exp $"; #endif /* not lint */ #include @@ -617,21 +617,21 @@ usage(void) fprintf(stderr, "usage:" - "\t%s -C [-c" kerbflag "lMvVy] [-b blocksize] [-D filesystem] [-f file]\n" + "\t%s -C [-cd" kerbflag "lMvVy] [-b blocksize] [-D filesystem] [-f file]\n" "\t%s [-F script] [-L limit] [-s fileno]\n" - "\t%s -i [-ach" kerbflag "lmMuvVy] [-A file] [-b blocksize] [-f file]\n" + "\t%s -i [-acdh" kerbflag "lmMuvVy] [-A file] [-b blocksize] [-f file]\n" "\t%s [-F script] " qfaflag "[-s fileno]\n" #ifdef USE_QFA - "\t%s -P file [-ach" kerbflag "lmMuvVy] [-A file] [-b blocksize]\n" + "\t%s -P file [-acdh" kerbflag "lmMuvVy] [-A file] [-b blocksize]\n" "\t%s [-f file] [-F script] [-s fileno] [-X filelist] [file ...]\n" #endif - "\t%s -r [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n" + "\t%s -r [-cd" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n" "\t%s [-s fileno] [-T directory]\n" - "\t%s -R [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n" + "\t%s -R [-cd" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n" "\t%s [-s fileno] [-T directory]\n" - "\t%s -t [-ch" kerbflag "lMuvVy] [-A file] [-b blocksize] [-f file]\n" + "\t%s -t [-cdh" kerbflag "lMuvVy] [-A file] [-b blocksize] [-f file]\n" "\t%s [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n" - "\t%s -x [-ach" kerbflag "lmMuvVy] [-A file] [-b blocksize] [-f file]\n" + "\t%s -x [-acdh" kerbflag "lmMuvVy] [-A file] [-b blocksize] [-f file]\n" "\t%s [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n", __progname, white, __progname, white, diff --git a/restore/restore.8.in b/restore/restore.8.in index d9d7fa9..74c182e 100644 --- a/restore/restore.8.in +++ b/restore/restore.8.in @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: restore.8.in,v 1.25 2002/02/04 11:18:46 stelian Exp $ +.\" $Id: restore.8.in,v 1.26 2002/06/05 13:29:15 stelian Exp $ .\" .Dd __DATE__ .Dt RESTORE 8 @@ -40,7 +40,7 @@ .Sh SYNOPSIS .Nm restore .Fl C -.Op Fl cklMvVy +.Op Fl cdklMvVy .Op Fl b Ar blocksize .Op Fl D Ar filesystem .Op Fl f Ar file @@ -50,7 +50,7 @@ .Op Fl T Ar directory .Nm restore .Fl i -.Op Fl achklmMNuvVy +.Op Fl acdhklmMNuvVy .Op Fl A Ar file .Op Fl b Ar blocksize .Op Fl f Ar file @@ -60,7 +60,7 @@ .Op Fl T Ar directory .Nm restore .Fl P Ar file -.Op Fl achklmMNuvVy +.Op Fl acdhklmMNuvVy .Op Fl A Ar file .Op Fl b Ar blocksize .Op Fl f Ar file @@ -71,7 +71,7 @@ .Op file ... .Nm restore .Fl R -.Op Fl cklMNuvVy +.Op Fl cdklMNuvVy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl F Ar script @@ -79,7 +79,7 @@ .Op Fl T Ar directory .Nm restore .Fl r -.Op Fl cklMNuvVy +.Op Fl cdklMNuvVy .Op Fl b Ar blocksize .Op Fl f Ar file .Op Fl F Ar script @@ -87,7 +87,7 @@ .Op Fl T Ar directory .Nm restore .Fl t -.Op Fl chklMNuvVy +.Op Fl cdhklMNuvVy .Op Fl A Ar file .Op Fl b Ar blocksize .Op Fl f Ar file @@ -99,7 +99,7 @@ .Op file ... .Nm restore .Fl x -.Op Fl achklmMNuvVy +.Op Fl adchklmMNuvVy .Op Fl A Ar file .Op Fl b Ar blocksize .Op Fl f Ar file @@ -360,6 +360,13 @@ old (pre-4.4) or new format file system. The .Fl c flag disables this check, and only allows reading a dump in the old format. +.It Fl d +The +.Fl d +(debug) +flag causes +.Nm restore +to print debug information. .It Fl D Ar filesystem The .Fl D