]> git.sur5r.net Git - bacula/bacula/commitdiff
Make the default bat restore Pool be Any. This fixes bug #1118.
authorKern Sibbald <kern@sibbald.com>
Wed, 23 Jul 2008 08:25:20 +0000 (08:25 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 23 Jul 2008 08:25:20 +0000 (08:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7420 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/patches/2.4.1-bat-restore.patch [new file with mode: 0644]
bacula/src/qt-console/restore/prerestore.cpp
bacula/technotes-2.5

diff --git a/bacula/patches/2.4.1-bat-restore.patch b/bacula/patches/2.4.1-bat-restore.patch
new file mode 100644 (file)
index 0000000..a45b504
--- /dev/null
@@ -0,0 +1,68 @@
+
+ This patch should fix bug #1118 where bat does not restore correctly
+ if multiple pools were used. Bat actually works correctly, but the default
+ Pool is taken from the Job resource, and for multiple pools the default
+ should be Any. This patch makes Any the default restore pool.
+ Apply it to version 2.4.1 with:
+
+ cd <bacula-source>
+ patch -p0 <2.4.1-bat-restore.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+Index: src/qt-console/restore/prerestore.cpp
+===================================================================
+--- src/qt-console/restore/prerestore.cpp      (revision 7414)
++++ src/qt-console/restore/prerestore.cpp      (working copy)
+@@ -1,7 +1,7 @@
+ /*
+    Bacula® - The Network Backup Solution
+-   Copyright (C) 2007-20087 Free Software Foundation Europe e.V.
++   Copyright (C) 2007-2008 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.
+@@ -20,7 +20,7 @@
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+    02110-1301, USA.
+-   Bacula® is a registered trademark of John Walker.
++   Bacula® is a registered trademark of Kern Sibbald.
+    The licensor of Bacula is the Free Software Foundation Europe
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+@@ -146,7 +146,7 @@
+    cmd += " fileset=\"" + filesetCombo->currentText() + "\"";
+    cmd += " client=\"" + clientCombo->currentText() + "\"";
+    if (selectJobRadio->isChecked()) {
+-      if (poolCombo->currentText() != "Any" ){
++      if (poolCombo->currentText() != tr("Any") ){
+          cmd += " pool=\"" + poolCombo->currentText() + "\"";
+       }
+       cmd += " storage=\"" + storageCombo->currentText() + "\"";
+@@ -171,12 +171,10 @@
+       Pmsg1(000, "preRestore command \'%s\'\n", cmd.toUtf8().data());
+    }
+    m_console->write_dir(cmd.toUtf8().data());
+-// consoleCommand(cmd);
+    /* Note, do not turn notifier back on here ... */
+    if (selectFilesRadio->isChecked()) {
+       setConsoleCurrent();
+-//    new restorePage();
+       closeStackPage();
+    } else {
+       closeStackPage();
+@@ -210,7 +208,7 @@
+    if (m_console->get_job_defaults(job_defs)) {
+       filesetCombo->setCurrentIndex(filesetCombo->findText(job_defs.fileset_name, Qt::MatchExactly));
+       clientCombo->setCurrentIndex(clientCombo->findText(job_defs.client_name, Qt::MatchExactly));
+-      poolCombo->setCurrentIndex(poolCombo->findText(job_defs.pool_name, Qt::MatchExactly));
++      poolCombo->setCurrentIndex(poolCombo->findText(tr("Any"), Qt::MatchExactly));
+       storageCombo->setCurrentIndex(storageCombo->findText(job_defs.store_name, Qt::MatchExactly));
+    }
+ }
index ef1ff534a5a09119f5a10f729e599b6c38113ffd..2243da2a945e5be55ca5c240a01978797ff8831a 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-20087 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2008 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.
@@ -146,7 +146,7 @@ void prerestorePage::okButtonPushed()
    cmd += " fileset=\"" + filesetCombo->currentText() + "\"";
    cmd += " client=\"" + clientCombo->currentText() + "\"";
    if (selectJobRadio->isChecked()) {
-      if (poolCombo->currentText() != "Any" ){
+      if (poolCombo->currentText() != tr("Any") ){
          cmd += " pool=\"" + poolCombo->currentText() + "\"";
       }
       cmd += " storage=\"" + storageCombo->currentText() + "\"";
@@ -171,12 +171,10 @@ void prerestorePage::okButtonPushed()
       Pmsg1(000, "preRestore command \'%s\'\n", cmd.toUtf8().data());
    }
    m_console->write_dir(cmd.toUtf8().data());
-// consoleCommand(cmd);
 
    /* Note, do not turn notifier back on here ... */
    if (selectFilesRadio->isChecked()) {
       setConsoleCurrent();
-//    new restorePage();
       closeStackPage();
    } else {
       closeStackPage();
@@ -210,7 +208,7 @@ void prerestorePage::job_name_change(int index)
    if (m_console->get_job_defaults(job_defs)) {
       filesetCombo->setCurrentIndex(filesetCombo->findText(job_defs.fileset_name, Qt::MatchExactly));
       clientCombo->setCurrentIndex(clientCombo->findText(job_defs.client_name, Qt::MatchExactly));
-      poolCombo->setCurrentIndex(poolCombo->findText(job_defs.pool_name, Qt::MatchExactly));
+      poolCombo->setCurrentIndex(poolCombo->findText(tr("Any"), Qt::MatchExactly));
       storageCombo->setCurrentIndex(storageCombo->findText(job_defs.store_name, Qt::MatchExactly));
    }
 }
index b596077fc782c4d72bed5cb01d568934685eca9d..161cf23624b1988b1d1d1744c40f133f653cdc24 100644 (file)
@@ -32,6 +32,8 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~)
 
 
 General:
+23Jul08
+kes  Make the default bat restore Pool be Any. This fixes bug #1118.
 22Jul08
 kes  Remove debug statement that crashes the SD at the end of
      a tape during restore. Fixes bug #1125.