]> git.sur5r.net Git - bacula/bacula/commitdiff
Doc new commands + allow mod of Verify Job
authorKern Sibbald <kern@sibbald.com>
Thu, 23 Oct 2003 14:25:34 +0000 (14:25 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 23 Oct 2003 14:25:34 +0000 (14:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@765 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/ChangeLog
bacula/kernstodo
bacula/platforms/freebsd/pthreads-fix.txt [new file with mode: 0644]
bacula/src/cats/make_catalog_backup.in
bacula/src/cats/make_mysql_tables.in
bacula/src/dird/ua_run.c

index 7a2b9e1c4cc38a906a4cee072cc218a008fa1b2f..2c9fe3bb61df4c11014c2e0baf3c5c16e78638a5 100644 (file)
@@ -1,6 +1,10 @@
 
 2003-10-15 Version 1.32c 22Oct03 Beta
 23Oct03
+- Document new features.
+- Implement mod of Verify Job at the run prompt.
+- Correct SQL table definitions so that MySQL and SQLite
+  have all the values in the same position.
 - Correct a typo in configure.in when configuring GNOME.
 - In doing a "status dir" make it loop over all the run
   commands in the Schedule rather than doing on the first one.
index 883876f4f1c100b88c2982ea9c185226df0fc705..15001d4f4e6d1a3eb4227e13c1cecc11a11b7dc6 100644 (file)
@@ -35,12 +35,8 @@ For 1.33 Testing/Documentation:
 - Document ln -sf /usr/lib/libncurses.so /usr/lib/libtermcap.so
   and install the esound-devĀ  package for compiling Console on 
   SuSE.
-- Document delete job command.
-- Document update volume pool and other command line keywords.
-- Document verify_disk_to_catalog
                 
 For 1.32c
-- Add VerifyJob to "run" summary (yes/mod/no) prompt.
 
 For 1.33
 - Finish implementation of Verify=DiskToCatalog
@@ -1063,4 +1059,8 @@ Done: (see kernsdone for more)
 - Limit the number of block checksum/header BB01, ... errors printed.
 - If last Full back is purged and an Incremental or Differential remains,
   Bacula does not promote the Incremental to a Full.
+- Document verify_disk_to_catalog
+- Document delete job command.
+- Document update volume pool and other command line keywords.
+- Add VerifyJob to "run" summary (yes/mod/no) prompt.
 
diff --git a/bacula/platforms/freebsd/pthreads-fix.txt b/bacula/platforms/freebsd/pthreads-fix.txt
new file mode 100644 (file)
index 0000000..d4fa099
--- /dev/null
@@ -0,0 +1,193 @@
+From bacula-users-admin@lists.sourceforge.net Mon Oct 20 23:44:13 2003
+Return-Path: <bacula-users-admin@lists.sourceforge.net>
+Received: from sc8-sf-list2.sourceforge.net (lists.sourceforge.net
+       [66.35.250.206]) by matou.sibbald.com (8.11.6/8.11.6) with ESMTP id
+       h9KLiDY13657 for <kern@sibbald.com>; Mon, 20 Oct 2003 23:44:13 +0200
+Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13]
+       helo=sc8-sf-list1.sourceforge.net) by sc8-sf-list2.sourceforge.net with
+       esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 1ABhpS-00013k-00; Mon, 20 Oct 2003
+       14:44:42 -0700
+Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11]
+       helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp
+        (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id
+       1ABhnp-0007qu-00 for <bacula-users@lists.sourceforge.net>; Mon, 20 Oct 2003
+       14:43:01 -0700
+Received: from bast.unixathome.org ([66.11.174.150] ident=postfix) by
+       sc8-sf-mx1.sourceforge.net with esmtp (Exim 4.22) id 1ABfiR-0002Iv-Q8 for
+       bacula-users@lists.sourceforge.net; Mon, 20 Oct 2003 12:29:19 -0700
+Received: from wocker (wocker.unixathome.org [192.168.0.99]) by
+       bast.unixathome.org (Postfix) with ESMTP id 258913F53 for
+       <bacula-users@lists.sourceforge.net>; Mon, 20 Oct 2003 15:25:33 -0400 (EDT)
+From: "Dan Langille" <dan@langille.org>
+To: bacula-users@lists.sourceforge.net
+MIME-Version: 1.0
+Message-ID: <3F93FF4E.14552.13ACB682@localhost>
+Priority: normal
+X-mailer: Pegasus Mail for Windows (v4.02a)
+Content-type: text/plain; charset=US-ASCII
+Content-description: Mail message body
+X-Spam-Score: 0.0 (/)
+X-Spam-Report: 0.0/5.0 Spam Filtering performed by sourceforge.net. See
+       http://spamassassin.org/tag/ for more details. Report problems to
+       https://sf.net/tracker/?func=add&group_id=1&atid=200001
+Subject: [Bacula-users] FreeBSD - large backups to tape
+Sender: bacula-users-admin@lists.sourceforge.net
+Errors-To: bacula-users-admin@lists.sourceforge.net
+X-BeenThere: bacula-users@lists.sourceforge.net
+X-Mailman-Version: 2.0.9-sf.net
+Precedence: bulk
+List-Help: <mailto:bacula-users-request@lists.sourceforge.net?subject=help>
+List-Post: <mailto:bacula-users@lists.sourceforge.net>
+List-Subscribe:
+       <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
+       <mailto:bacula-users-request@lists.sourceforge.net?subject=subscribe>
+List-Id: Bacula user's email list for support and discussions
+       <bacula-users.lists.sourceforge.net>
+List-Unsubscribe:
+       <https://lists.sourceforge.net/lists/listinfo/bacula-users>,
+       <mailto:bacula-users-request@lists.sourceforge.net?subject=unsubscribe>
+List-Archive:
+       <http://sourceforge.net/mailarchive/forum.php?forum=bacula-users>
+Date: Mon, 20 Oct 2003 15:29:18 -0400
+Content-Transfer-Encoding: 8bit
+
+Kern and I have been working on a FreeBSD/Bacula problem.  
+He's asked me to post this to the list.  The problem was within the
+FreeBSD pthreads library.  A solution has been found.
+
+PROBLEM DESCRIPTION:
+
+The FreeBSD pthreads library does not properly handle End Of Tape.
+This problem will be fixed in FreeBSD 4.9.  The bug results in more
+data being written to the tape than could be read.  Any backup which
+involved more than one tape would be incomplete.
+
+DEMONSTRATION:
+
+To demonstrate the problem, tapetest.c can be obtained from 
+http://www.freebsd.org/cgi/query-pr.cgi?pr=56274
+
+This tests without pthreads:
+
+ *  If you build this program with:
+ *
+ *  c++ -g -O2 -Wall -c tapetest.c
+ *  c++ -g -O2 -Wall tapetest.o -o tapetest
+ *
+ *  Procedure for testing tape
+ *  ./tapetest /dev/your-tape-device
+ *  rewind
+ *  rawfill
+ *  rewind
+ *  scan
+ *
+ *  The output will be something like:
+ *
+ * ========
+ *  Rewound /dev/nsa0
+ *  *Begin writing blocks of 64512 bytes.
+ *  ++++++++++++++++++++ ...
+ *  Write failed.  Last block written=17294. stat=0 ERR=Unknown 
+error: 0
+ *  weof_dev
+ *  Wrote EOF to /dev/nsa0
+ *  *Rewound /dev/nsa0
+ *  *Starting scan at file 0
+ *  17294 blocks of 64512 bytes in file 0
+ *  End of File mark.
+ *  End of File mark.
+ *  End of tape
+ *  Total files=1, blocks=17294, bytes = 1115670528
+ * ========
+ *
+ *  which is correct. Notice that the return status is
+ *  0, while in the example below, which fails, the return
+ *  status is -1.
+
+This tests with pthreads:
+
+ *  If you build this program with:
+ *
+ *  c++ -g -O2 -Wall -pthread -c tapetest.c
+ *  c++ -g -O2 -Wall -pthread tapetest.o -o tapetest
+ *    Note, we simply added -pthread compared to the
+ *    previous example.
+ *
+ *  Procedure for testing tape
+ *  ./tapetest /dev/your-tape-device
+ *  rewind
+ *  rawfill
+ *  rewind
+ *  scan
+ *
+ *  The output will be something like:
+ *
+ * ========
+ *    Rewound /dev/nsa0
+ *    *Begin writing blocks of 64512 bytes.
+ *    +++++++++++++++++++++++++++++ ...
+ *    Write failed.  Last block written=17926. stat=-1 ERR=No space left on device
+ *    weof_dev
+ *    Wrote EOF to /dev/nsa0
+ *    *Rewound /dev/nsa0
+ *    *Starting scan at file 0
+ *    17913 blocks of 64512 bytes in file 0
+ *    End of File mark.
+ *    End of File mark.
+ *    End of tape
+ *    Total files=1, blocks=17913, bytes = 1155603456
+ * ========
+ *
+ * which is incroorect because it wrote 17,926 blocks but read
+ * back only 17,913 blocks
+
+If you get the same number of blocks written and read WHEN using 
+pthreads, then you've been correctly patched.
+
+SOLUTION:
+
+For FreeBSD prior to 4.9, you have two choices to ensure proper
+backups.  These instructions assume you are familiar with patching
+FreeBSD and already have the FreeBSD source code installed on your
+machine.  
+
+1 - cvsup and build your system to FreeBSD 4.8-STABLE
+
+2 - Apply this patch.
+
+http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6&r2=1.16.2.7
+
+To apply the patch, follow these instructions as root.  
+
+fetch -o pthread.diff http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc_r/uthread/uthread_write.c.diff?r1=1.16.2.6\&r2=1.16.2.7
+
+cd /usr/src/lib/libc_r/uthread/
+patch < /path/to/pthread.diff
+cd ..
+make all install
+
+I recommend restarting Bacula.
+
+
+TESTING:
+
+I suggest running tapetest on your patched system and then
+conducting a backup which spans two tapes.  Restore the data
+and compare to the original.  If not identical, please let us know.
+
+Thanks
+
+-- 
+Dan Langille : http://www.langille.org/
+
+
+
+-------------------------------------------------------
+This SF.net email is sponsored by OSDN developer relations
+Here's your chance to show off your extensive product knowledge
+We want to know what you know. Tell us and you have a chance to win $100
+http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
+_______________________________________________
+Bacula-users mailing list
+Bacula-users@lists.sourceforge.net
+https://lists.sourceforge.net/lists/listinfo/bacula-users
index 94115576b2e12ea8f2c4c4a4f81cbc6eb8e0c4a5..fe9c774fc3b9b311e4bf21d5837fcf488ba8fd93 100755 (executable)
@@ -6,9 +6,9 @@
 cd @working_dir@
 rm -f bacula.sql
 if test xsqlite = x@DB_NAME@ ; then
-echo ".dump" | @SQL_BINDIR@/sqlite bacula.db >bacula.sql
+  echo ".dump" | @SQL_BINDIR@/sqlite bacula.db >bacula.sql
 else
-@SQL_BINDIR@/mysqldump $* -f --opt bacula >bacula.sql
+  @SQL_BINDIR@/mysqldump $* -f --opt bacula >bacula.sql
 fi
 #
 #  To read back a MySQL database use: 
index 1ce0d6aadcab7d5c15fdce62bb6a4701ab40647a..d84dad313f77c276a4a4e4ef2ae4f16526c1ab0a 100644 (file)
@@ -105,7 +105,6 @@ CREATE TABLE Media (
    VolBytes BIGINT UNSIGNED NOT NULL,
    VolErrors INTEGER UNSIGNED NOT NULL,
    VolWrites INTEGER UNSIGNED NOT NULL,
-   MaxVolBytes BIGINT UNSIGNED NOT NULL,
    VolCapacityBytes BIGINT UNSIGNED NOT NULL,
    VolStatus ENUM('Full', 'Archive', 'Append', 'Recycle', 'Purged',
     'Read-Only', 'Disabled', 'Error', 'Busy', 'Used', 'Cleaning') NOT NULL,
@@ -114,6 +113,7 @@ CREATE TABLE Media (
    VolUseDuration BIGINT UNSIGNED NOT NULL,
    MaxVolJobs INTEGER UNSIGNED NOT NULL,
    MaxVolFiles INTEGER UNSIGNED NOT NULL,
+   MaxVolBytes BIGINT UNSIGNED NOT NULL,
    PRIMARY KEY(MediaId),
    INDEX (PoolId)
    );
index 8fc402644fea3120e37a680e6815bbfbca35e30d..e2339e9ea11fcea0351b6566afe9559e19630e07 100644 (file)
@@ -567,6 +567,9 @@ Priority:   %d\n"),
       if (jcr->JobType == JT_BACKUP ||
          jcr->JobType == JT_VERIFY) {
          add_prompt(ua, _("Pool"));          /* 7 */
+        if (jcr->JobType == JT_VERIFY) {
+            add_prompt(ua, _("Verify Job"));  /* 8 */
+        }
       } else if (jcr->JobType == JT_RESTORE) {
          add_prompt(ua, _("Bootstrap"));     /* 7 */
          add_prompt(ua, _("Where"));         /* 8 */
@@ -727,6 +730,16 @@ Priority:   %d\n"),
         }
         goto try_again;
       case 8:
+        /* Verify Job */
+        if (jcr->JobType == JT_VERIFY) {
+           JOB *job = select_job_resource(ua);
+           if (job) {
+              jcr->job->verify_job = job;
+           } else {
+              jcr->job->verify_job = NULL;
+           }
+           goto try_again;
+        }
         /* Where */
          if (!get_cmd(ua, _("Please enter path prefix for restore (/ for none): "))) {
            break;