]> git.sur5r.net Git - bacula/bacula/commitdiff
28Feb07
authorKern Sibbald <kern@sibbald.com>
Wed, 28 Feb 2007 10:33:19 +0000 (10:33 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 28 Feb 2007 10:33:19 +0000 (10:33 +0000)
kes  Correct typeo in var.c patch.
27Feb07
kes  Don't let Bacula prune File or Job records for the current Job.
kes  Fix variable substitution pad + inc bug reported (with patch)
     in bug #791.
26Feb07
kes  Correct SQLite log table index as reported by Luca Berra

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.0@4278 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/INSTALL
bacula/README
bacula/src/cats/make_sqlite3_tables.in
bacula/src/cats/make_sqlite_tables.in
bacula/src/dird/ua_prune.c
bacula/src/lib/var.c
bacula/src/version.h
bacula/technotes-2.0

index 41f8213921da1148c478e3d8b4d9be3616aa678a..2dd8a48eda58504ad3684f77bd59035e21bb44d4 100644 (file)
@@ -1,3 +1,8 @@
+
+This file is rather out of date, and if you want to avoid a lot
+of pain, you will read the manual, which you can find at www.bacula.org 
+
+
 --------------------------------------------------------------------------
 Using GNU autoconfig
 --------------------------------------------------------------------------
index ea5a760f3d20902fd87ecb00713da85aaa7db090..67c06b806b0a138ca9c5618bcbadf534b209b297 100644 (file)
@@ -4,6 +4,8 @@ to read the online manual at:
 
   http://www.bacula.org
 
+You will save yourself a lot of pain if you read
+the manual -- it is online at the above site.
 Barring reading the manual, you might try the
 following:
 
@@ -14,19 +16,13 @@ To Configure it:
     --sysconfdir=$HOME/bacula/bin \
     --with-pid-dir=$HOME/bacula/bin \
     --with-subsys-dir=$HOME/bacula/bin \
-    --with-sqlite=$HOME/depkgs/sqlite \
     --enable-gnome \
-    --with-mysql=$HOME/mysql \
+    --with-mysql \
     --with-working-dir=$HOME/bacula/bin/working \
     --with-dump-email=YOUR_EMAIL_ADDRESS \
     --with-job-email=YOUR_EMAIL_ADDRESS \
     --with-smtp-host=YOUR_SMTP_SERVER_ADDRESS
 
-If you want to use SQLite, please download depkgs and
-build sqlite, then add something like:
-
-    --with-sqlite=$HOME/depkgs/sqlite
-
 
 Build Bacula:
 
index fe44892255bbf5d730a5d86b154d3fba9f573752..9fcbb6c6c8e14bbf5bbcb1ef24136cd44cafa6f1 100644 (file)
@@ -101,7 +101,7 @@ CREATE TABLE Log (
    LogText TEXT NOT NULL,
    PRIMARY KEY(LogId) 
    );
-CREATE INDEX LogInx1 ON File (JobId);
+CREATE INDEX LogInx1 ON Log (JobId);
 
 
 CREATE TABLE FileSet (
index fe44892255bbf5d730a5d86b154d3fba9f573752..9fcbb6c6c8e14bbf5bbcb1ef24136cd44cafa6f1 100644 (file)
@@ -101,7 +101,7 @@ CREATE TABLE Log (
    LogText TEXT NOT NULL,
    PRIMARY KEY(LogId) 
    );
-CREATE INDEX LogInx1 ON File (JobId);
+CREATE INDEX LogInx1 ON Log (JobId);
 
 
 CREATE TABLE FileSet (
index 52fb760520cdb69d80dfa587be41a5f1879b6a16..8faa8aec9a815d52cc99634504ba4786765e8fe3 100644 (file)
@@ -1,16 +1,7 @@
-/*
- *
- *   Bacula Director -- User Agent Database prune Command
- *      Applies retention periods
- *
- *     Kern Sibbald, February MMII
- *
- *   Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2007 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *
+ *   Bacula Director -- User Agent Database prune Command
+ *      Applies retention periods
+ *
+ *     Kern Sibbald, February MMII
+ *
+ *   Version $Id$
+ */
 
 #include "bacula.h"
 #include "dird.h"
@@ -267,11 +267,15 @@ int prune_files(UAContext *ua, CLIENT *client)
    db_sql_query(ua->db, query, file_delete_handler, (void *)&del);
 
    for (i=0; i < del.num_ids; i++) {
-      purge_files_from_job(ua, del.JobId[i]);
+      /* Don't prune current job */
+      if (ua->jcr->JobId != del.JobId[i]) {
+         purge_files_from_job(ua, del.JobId[i]);
+         del.num_del++;
+      }
    }
-   edit_uint64_with_commas(del.num_ids, ed1);
+   edit_uint64_with_commas(del.num_del, ed1);
    bsendmsg(ua, _("Pruned Files from %s Jobs for client %s from catalog.\n"),
-      ed1, client->hdr.name);
+      ed1, client->name());
 
 bail_out:
    db_unlock(ua->db);
@@ -418,13 +422,17 @@ int prune_jobs(UAContext *ua, CLIENT *client, int JobType)
     * Then delete the Job entry, and finally and JobMedia records.
     */
    for (i=0; i < del.num_ids; i++) {
-      if (!del.PurgedFiles[i]) {
-         purge_files_from_job(ua, del.JobId[i]);
+      /* Don't prune current job */
+      if (ua->jcr->JobId != del.JobId[i]) {
+         if (!del.PurgedFiles[i]) {
+            purge_files_from_job(ua, del.JobId[i]);
+         }
+         purge_job_from_catalog(ua, del.JobId[i]);
+         del.num_del++;
       }
-      purge_job_from_catalog(ua, del.JobId[i]);
    }
-   bsendmsg(ua, _("Pruned %d %s for client %s from catalog.\n"), del.num_ids,
-      del.num_ids==1?_("Job"):_("Jobs"), client->hdr.name);
+   bsendmsg(ua, _("Pruned %d %s for client %s from catalog.\n"), del.num_del,
+      del.num_del==1?_("Job"):_("Jobs"), client->name());
 
 bail_out:
    drop_temp_tables(ua);
@@ -523,7 +531,7 @@ bool prune_volume(UAContext *ua, MEDIA_DBR *mr)
          continue;
       }
       Dmsg2(200, "Looking at %s JobTdate=%d\n", jr.Job, (int)jr.JobTDate);
-      if (jr.JobTDate >= (now - period)) {
+      if (jr.JobTDate >= (now - period) || ua->jcr->JobId == del.JobId[i]) {
          continue;
       }
       purge_files_from_job(ua, del.JobId[i]);
index aac43f66e9e385f69765fe18d512d27d2b2cd0c9..27bf15d75d79552b90099646610af4406cc0f3be 100644 (file)
@@ -1990,8 +1990,9 @@ parse_variable_complex(
         rc = VAR_ERR_INCOMPLETE_VARIABLE_SPEC;
         goto error_return;
     }
-    inc = (*p == '+');                /* increment variable */
-    p++;
+    if ((inc = (*p++ == '+'))) {
+       p++;                           /* skip the + */ 
+    }
 
     /* lookup the variable value now */
     if (failed) {
index c03c05e0c91c50a7f9425c331f693342b61a217b..09221037cb7e3406c3a68c4a7e6fdf377ecf6fc3 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.0.3"
-#define BDATE   "22 February 2007"
-#define LSMDATE "22Feb07"
+#define BDATE   "28 February 2007"
+#define LSMDATE "28Feb07"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2007"       /* year for copyright messages in progs */
index 8155c296ac816138ff5450011dbd30471629031b..852b56b6cdcea5dc971cde2293169150ff109e26 100644 (file)
@@ -1,6 +1,14 @@
               Technical notes on version 2.0
 
 General:
+28Feb07 
+kes  Correct typeo in var.c patch.
+27Feb07
+kes  Don't let Bacula prune File or Job records for the current Job.
+kes  Fix variable substitution pad + inc bug reported (with patch)
+     in bug #791.
+26Feb07
+kes  Correct SQLite log table index as reported by Luca Berra.
 24Feb07
 ebl  Fix fifo stuff, bacula tries to rewind the fifo... Thanks to Andreas
 22Feb07