]> git.wh0rd.org - dump.git/commitdiff
Documented the -d option in restore.
authorStelian Pop <stelian@popies.net>
Wed, 5 Jun 2002 13:29:12 +0000 (13:29 +0000)
committerStelian Pop <stelian@popies.net>
Wed, 5 Jun 2002 13:29:12 +0000 (13:29 +0000)
Added a -v (verbose) mode to dump.

CHANGES
dump/dump.8.in
dump/dump.h
dump/main.c
restore/main.c
restore/restore.8.in

diff --git a/CHANGES b/CHANGES
index 1fbab6fa6a1f0660400fe2de1046ef462b43acdc..d7dd61dc2888491494cf02ac4a9f4e459924131b 100644 (file)
--- 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)
 ====================================================================
index 657f78065382a046730c3d26721aad359bc5ae01..455f8c0bdf5d7ddfc15eb57945b8ca5f7e542b0d 100644 (file)
@@ -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.
index a392aacd205dd3fdc0c262681c1b8930a20b76ed..e6d8e138b9059fc774b719a96cea51764b8ca232 100644 (file)
@@ -5,7 +5,7 @@
  *     Stelian Pop <stelian@popies.net>, 1999-2000
  *     Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 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 */
index 93c175c73b509e604595f1e874da4890ca4c14aa..173ec03a38026b54edb60f51a0594169080f2492 100644 (file)
@@ -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 <config.h>
@@ -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] "
index eef486af21c879f57c02cb2ceddd82d600b602fd..dc875be581f746781bbca329f6bae98e503b818c 100644 (file)
@@ -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 <config.h>
@@ -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, 
index d9d7fa995c1d98ae2105920a25cd71a92db79395..74c182ee2aa61b48e6fd65883c9af59c0d0209b4 100644 (file)
@@ -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