2 This patch should fix bug #1118 where bat does not restore correctly
3 if multiple pools were used. Bat actually works correctly, but the default
4 Pool is taken from the Job resource, and for multiple pools the default
5 should be Any. This patch makes Any the default restore pool.
6 Apply it to version 2.4.1 with:
9 patch -p0 <2.4.1-bat-restore.patch
10 ./configure <your-options>
16 Index: src/qt-console/restore/prerestore.cpp
17 ===================================================================
18 --- src/qt-console/restore/prerestore.cpp (revision 7414)
19 +++ src/qt-console/restore/prerestore.cpp (working copy)
22 Bacula® - The Network Backup Solution
24 - Copyright (C) 2007-20087 Free Software Foundation Europe e.V.
25 + Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
27 The main author of Bacula is Kern Sibbald, with contributions from
28 many others, a complete list can be found in the file AUTHORS.
30 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
33 - Bacula® is a registered trademark of John Walker.
34 + Bacula® is a registered trademark of Kern Sibbald.
35 The licensor of Bacula is the Free Software Foundation Europe
36 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
37 Switzerland, email:ftf@fsfeurope.org.
39 cmd += " fileset=\"" + filesetCombo->currentText() + "\"";
40 cmd += " client=\"" + clientCombo->currentText() + "\"";
41 if (selectJobRadio->isChecked()) {
42 - if (poolCombo->currentText() != "Any" ){
43 + if (poolCombo->currentText() != tr("Any") ){
44 cmd += " pool=\"" + poolCombo->currentText() + "\"";
46 cmd += " storage=\"" + storageCombo->currentText() + "\"";
48 Pmsg1(000, "preRestore command \'%s\'\n", cmd.toUtf8().data());
50 m_console->write_dir(cmd.toUtf8().data());
51 -// consoleCommand(cmd);
53 /* Note, do not turn notifier back on here ... */
54 if (selectFilesRadio->isChecked()) {
56 -// new restorePage();
61 if (m_console->get_job_defaults(job_defs)) {
62 filesetCombo->setCurrentIndex(filesetCombo->findText(job_defs.fileset_name, Qt::MatchExactly));
63 clientCombo->setCurrentIndex(clientCombo->findText(job_defs.client_name, Qt::MatchExactly));
64 - poolCombo->setCurrentIndex(poolCombo->findText(job_defs.pool_name, Qt::MatchExactly));
65 + poolCombo->setCurrentIndex(poolCombo->findText(tr("Any"), Qt::MatchExactly));
66 storageCombo->setCurrentIndex(storageCombo->findText(job_defs.store_name, Qt::MatchExactly));