From 669e5ad855302d0c58777b9d1dcf512a4d60de68 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 18 Jul 2008 08:44:03 +0000 Subject: [PATCH] Correct typo in mtx-changer script git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7395 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/scripts/mtx-changer.in | 2 +- bacula/src/dird/job.c | 11 +++++++++++ bacula/src/dird/vbackup.c | 16 +++++++--------- bacula/src/version.h | 4 ++-- bacula/technotes-2.5 | 2 ++ 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/bacula/scripts/mtx-changer.in b/bacula/scripts/mtx-changer.in index a237766d14..a40e13769c 100644 --- a/bacula/scripts/mtx-changer.in +++ b/bacula/scripts/mtx-changer.in @@ -170,7 +170,7 @@ case $cmd in make_temp_file if test ${inventory} -ne 0 ; then ${MTX} -f $ctl inventory - } + fi ${MTX} -f $ctl status >${TMPFILE} rtn=$? if test ${vxa_packetloader} -ne 0 ; then diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 16a03b81ba..74ec03e80c 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -178,6 +178,17 @@ bool setup_job(JCR *jcr) goto bail_out; } + if (jcr->JobReads() && !jcr->rstorage) { + if (jcr->job->storage) { + copy_rwstorage(jcr, jcr->job->storage, _("Job resource")); + } else { + copy_rwstorage(jcr, jcr->job->pool->storage, _("Pool resource")); + } + } + if (!jcr->JobReads()) { + free_rstorage(jcr); + } + /* * Now, do pre-run stuff, like setting job level (Inc/diff, ...) * this allows us to setup a proper job start record for restarting diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c index 8f735ca1f9..63d0756ede 100644 --- a/bacula/src/dird/vbackup.c +++ b/bacula/src/dird/vbackup.c @@ -93,7 +93,7 @@ bool do_vbackup_init(JCR *jcr) POOLMEM *jobids = get_pool_memory(PM_FNAME); db_accurate_get_jobids(jcr, jcr->db, &jcr->jr, jobids); - Dmsg1(000, "Accurate jobids=%s\n", jobids); + Dmsg1(100, "Accurate jobids=%s\n", jobids); if (*jobids == 0) { free_pool_memory(jobids); Jmsg(jcr, M_FATAL, 0, _("Cannot find previous JobIds.\n")); @@ -164,8 +164,8 @@ bool do_vbackup(JCR *jcr) /* * Now start a job with the Storage daemon */ - Dmsg2(000, "rstorage=%p wstorage=%p\n", jcr->rstorage, jcr->wstorage); - Dmsg2(000, "Read store=%s, write store=%s\n", + Dmsg2(100, "rstorage=%p wstorage=%p\n", jcr->rstorage, jcr->wstorage); + Dmsg2(100, "Read store=%s, write store=%s\n", ((STORE *)jcr->rstorage->first())->name(), ((STORE *)jcr->wstorage->first())->name()); if (((STORE *)jcr->rstorage->first())->name() == ((STORE *)jcr->wstorage->first())->name()) { @@ -176,15 +176,13 @@ bool do_vbackup(JCR *jcr) if (!start_storage_daemon_job(jcr, jcr->rstorage, jcr->wstorage)) { return false; } - Dmsg0(000, "Storage daemon connection OK\n"); + Dmsg0(100, "Storage daemon connection OK\n"); if (!send_bootstrap_file(jcr, sd) || !response(jcr, sd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) { return false; } - Dmsg0(000, "Bootstrap file sent\n"); - /* * We re-update the job start record so that the start * time is set after the run before job. This avoids @@ -484,7 +482,7 @@ static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids) * Find files for this JobId and insert them in the tree */ Mmsg(rx.query, uar_sel_files, edit_int64(JobId, ed1)); - Dmsg1(000, "uar_sel_files=%s\n", rx.query); + Dmsg1(100, "uar_sel_files=%s\n", rx.query); if (!db_sql_query(ua->db, rx.query, insert_bootstrap_handler, (void *)rx.bsr)) { Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(ua->db)); } @@ -494,8 +492,8 @@ static bool create_bootstrap_file(JCR *jcr, POOLMEM *jobids) #endif complete_bsr(ua, rx.bsr); - Dmsg0(000, "Print bsr\n"); - print_bsr(ua, rx.bsr); +// Dmsg0(000, "Print bsr\n"); +// print_bsr(ua, rx.bsr); jcr->ExpectedFiles = write_bsr_file(ua, rx); Dmsg1(000, "Found %d files to consolidate.\n", jcr->ExpectedFiles); diff --git a/bacula/src/version.h b/bacula/src/version.h index 2e9c198d85..05dbfba144 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.5.2" -#define BDATE "175 July 2008" -#define LSMDATE "175Jul08" +#define BDATE "18 July 2008" +#define LSMDATE "18Jul08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 44cb58c225..fd53b3d8dc 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -30,6 +30,8 @@ vtape driver General: +18Jul08 +kes Setup rstorage correctly. Virtual backups are working. 17Jul08 kes Move setting JobLevel and JobType into a method, which should allow completing Virtual Backups. -- 2.39.5