]> git.sur5r.net Git - bacula/bacula/commitdiff
This patch should correct bug #1159 where Migration does not properly
authorKern Sibbald <kern@sibbald.com>
Wed, 8 Oct 2008 10:28:44 +0000 (10:28 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 8 Oct 2008 10:28:44 +0000 (10:28 +0000)
 respect the Migration Low Bytes directive.

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

bacula/patches/2.4.2-migrate-poolsize.patch [new file with mode: 0644]
bacula/src/dird/migrate.c
bacula/src/version.h
bacula/technotes-2.4

diff --git a/bacula/patches/2.4.2-migrate-poolsize.patch b/bacula/patches/2.4.2-migrate-poolsize.patch
new file mode 100644 (file)
index 0000000..986ec97
--- /dev/null
@@ -0,0 +1,39 @@
+
+ This patch should correct bug #1159 where Migration does not properly
+ respect the Migration Low Bytes directive. 
+
+ Apply it to Bacula version 2.4.2 (or possibly earlier) with:
+
+   cd <bacula-source>
+   patch -p0 <2.4.2-migrate-poolsize.patch
+   ./configure <your-options>
+   make
+   ...
+   make install
+
+
+Index: src/dird/migrate.c
+===================================================================
+--- src/dird/migrate.c (revision 7566)
++++ src/dird/migrate.c (working copy)
+@@ -557,13 +557,16 @@
+    " AND Job.Type='B'"
+    " ORDER by Job.StartTime";
+-/* Get tne number of bytes in the pool */
++/* Get the number of bytes in the pool */
+ const char *sql_pool_bytes =
+-   "SELECT SUM(VolBytes) FROM Media,Pool WHERE"
++   "SELECT SUM(JobBytes) FROM Job WHERE JobId IN"
++   " (SELECT DISTINCT Job.JobId from Pool,Job,Media,JobMedia WHERE"
++   " Pool.Name='%s' AND Media.PoolId=Pool.PoolId AND"
+    " VolStatus in ('Full','Used','Error','Append') AND Media.Enabled=1 AND"
+-   " Media.PoolId=Pool.PoolId AND Pool.Name='%s'";
++   " Job.Type='B' AND"
++   " JobMedia.JobId=Job.JobId AND Job.PoolId=Media.PoolId)";
+-/* Get tne number of bytes in the Jobs */
++/* Get the number of bytes in the Jobs */
+ const char *sql_job_bytes =
+    "SELECT SUM(JobBytes) FROM Job WHERE JobId IN (%s)";
index d36d63b7a69c3178ecffff89798ccd88ccd62815..a1b54c40f08f567e7d628aa81f285a7660d9f979 100644 (file)
@@ -557,13 +557,16 @@ const char *sql_jobids_from_mediaid =
    " AND Job.Type='B'"
    " ORDER by Job.StartTime";
 
-/* Get tne number of bytes in the pool */
+/* Get the number of bytes in the pool */
 const char *sql_pool_bytes =
-   "SELECT SUM(VolBytes) FROM Media,Pool WHERE"
+   "SELECT SUM(JobBytes) FROM Job WHERE JobId IN"
+   " (SELECT DISTINCT Job.JobId from Pool,Job,Media,JobMedia WHERE"
+   " Pool.Name='%s' AND Media.PoolId=Pool.PoolId AND"
    " VolStatus in ('Full','Used','Error','Append') AND Media.Enabled=1 AND"
-   " Media.PoolId=Pool.PoolId AND Pool.Name='%s'";
+   " Job.Type='B' AND"
+   " JobMedia.JobId=Job.JobId AND Job.PoolId=Media.PoolId)";
 
-/* Get tne number of bytes in the Jobs */
+/* Get the number of bytes in the Jobs */
 const char *sql_job_bytes =
    "SELECT SUM(JobBytes) FROM Job WHERE JobId IN (%s)";
 
index 5355414598358720418f65510b355cb7d99c9f3a..efd5a98f216d75cb1a89e882bd7098ecdfa11a69 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "2.4.3"
-#define BDATE   "26 August 2008"
-#define LSMDATE "26Aug08"
+#define BDATE   "08 October 2008"
+#define LSMDATE "08Oct08"
 
 #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
 #define BYEAR "2008"       /* year for copyright messages in progs */
index fd739edd520fb6a683193718ac67efcebaad74c2..17bcc1240e1bbd3bef38b0cb182b54b8c4564565 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.4
 
 General:
+08Oct08
+kes  This should correct bug #1159 where Migration does not properly
+     respect the Migration Low Bytes directive.
 02Oct08
 ebl  Fix typo in configure.in that breaks --with-db-password option
 24Sep08