From: Kern Sibbald Date: Thu, 30 Sep 2004 14:15:05 +0000 (+0000) Subject: - Apply Martin's patch for fixing console modifications to Verify Jobs. X-Git-Tag: Release-1.35.6~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c8be52343b7ccc8ceb8feeea8750c988d7288e73;p=bacula%2Fbacula - Apply Martin's patch for fixing console modifications to Verify Jobs. - Fix Win32 so that it can backup files that are opened by programs such as Word (certain open system files cannot be backed up). git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1624 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 5a024f2a11..1da6e9aada 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,13 +1,14 @@ - Release Notes for Bacula 1.35.5 + Release Notes for Bacula 1.35.6 - Bacula code: Total files = 395 Total lines = 115,062 (*.h *.c *.in) + Bacula code: Total files = 396 Total lines = 116,116 (*.h *.c *.in) Changes for 1.35.5 Major Changes: - Tray monitor program - Bacula Rescue CDROM +- Bacula CD Image Manager - Lots of improvements in the Rescue scripts -- better network detection, better mounting code, ... - General bug fixes/stabilization diff --git a/bacula/kernstodo b/bacula/kernstodo index 2b1a10ec9d..2374bb5ed7 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -17,13 +17,12 @@ Version 1.35 Kern (see below) block numbers in btape "test". Possibly adjust in Bacula. - Fix possible bug in update volumefrompool (email 9/28 from jesk@killall.org -- Fix storage overrides in Run directives. +- Look into failing Excludes in Win32 - Document a get out of jail procedure if everything breaks if you lost/broke the Catalog -- do the same for "I know my file is there how do I get it back?". -- Add "Rerun failed levels = yes/no" to Job resource. Maybe for 1.35: @@ -34,6 +33,8 @@ Maybe for 1.35: - Add IPv6 to regression - Perhaps add read/write programs and/or plugins to FileSets. - How to handle backing up portables ... +- Add "Rerun failed levels = yes/no" to Job resource. +- Add some sort of guaranteed Interval for upgrading jobs. Documentation to do: (any release a little bit at a time) - Alternative to static linking "ldd prog" save all binaries listed, @@ -68,6 +69,8 @@ Testing to do: (painful) For 1.37 Testing/Documentation: +- Fix list volumes to output volume retention in some other + units, perhaps via a directive. - If opening a tape in read/write mode fails attempt to open it in read-only mode, and mark the tape for read only. - Add a read-only mode to the mount option. @@ -1363,3 +1366,4 @@ Block Position: 0 - Fix bscan so that it releases the drive when requesting a new tape. - List verify options for DiskToCatalog in doc. - Turn on transactions if multiple connections are on in DB. +- Fix storage overrides in Run directives. diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index f909cf23fb..4dbef21388 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -772,6 +772,8 @@ void set_jcr_defaults(JCR *jcr, JOB *job) if (job->RestoreBootstrap) { jcr->RestoreBootstrap = bstrdup(job->RestoreBootstrap); } + /* This can be overridden by Console program */ + jcr->verify_job = job->verify_job; /* If no default level given, set one */ if (jcr->JobLevel == 0) { switch (jcr->JobType) { diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index 7078d2f95e..592cef898f 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -369,6 +369,7 @@ int run_cmd(UAContext *ua, const char *cmd) jcr = new_jcr(sizeof(JCR), dird_free_jcr); set_jcr_defaults(jcr, job); + jcr->verify_job = verify_job; jcr->store = store; jcr->client = client; jcr->fileset = fileset; @@ -492,8 +493,8 @@ Priority: %d\n"), jcr->JobPriority); } else { /* JT_VERIFY */ const char *Name; - if (jcr->job->verify_job) { - Name = jcr->job->verify_job->hdr.name; + if (jcr->verify_job) { + Name = jcr->verify_job->hdr.name; } else { Name = ""; } @@ -768,11 +769,9 @@ Priority: %d\n"), case 8: /* Verify Job */ if (jcr->JobType == JT_VERIFY) { - JOB *job = select_job_resource(ua); - if (job) { - jcr->job->verify_job = job; - } else { - jcr->job->verify_job = NULL; + verify_job = select_job_resource(ua); + if (verify_job) { + jcr->verify_job = verify_job; } goto try_again; } diff --git a/bacula/src/dird/verify.c b/bacula/src/dird/verify.c index cfbef32625..582f237231 100644 --- a/bacula/src/dird/verify.c +++ b/bacula/src/dird/verify.c @@ -90,10 +90,10 @@ bool do_verify(JCR *jcr) jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG || jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG) { memcpy(&jr, &jcr->jr, sizeof(jr)); - if (jcr->job->verify_job && + if (jcr->verify_job && (jcr->JobLevel == L_VERIFY_VOLUME_TO_CATALOG || jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG)) { - Name = jcr->job->verify_job->hdr.name; + Name = jcr->verify_job->hdr.name; } else { Name = NULL; } @@ -204,8 +204,8 @@ bool do_verify(JCR *jcr) jcr->sd_auth_key = bstrdup("dummy"); /* dummy Storage daemon key */ } - if (jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG && jcr->job->verify_job) { - jcr->fileset = jcr->job->verify_job->fileset; + if (jcr->JobLevel == L_VERIFY_DISK_TO_CATALOG && jcr->verify_job) { + jcr->fileset = jcr->verify_job->fileset; } Dmsg2(100, "ClientId=%u JobLevel=%c\n", verify_jr.ClientId, jcr->JobLevel); @@ -409,8 +409,8 @@ static void verify_cleanup(JCR *jcr, int TermCode) } bstrftime(sdt, sizeof(sdt), jcr->jr.StartTime); bstrftime(edt, sizeof(edt), jcr->jr.EndTime); - if (jcr->job->verify_job) { - Name = jcr->job->verify_job->hdr.name; + if (jcr->verify_job) { + Name = jcr->verify_job->hdr.name; } else { Name = ""; } diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c index 9c50c4beef..9197233da3 100644 --- a/bacula/src/findlib/bfile.c +++ b/bacula/src/findlib/bfile.c @@ -246,7 +246,7 @@ int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode) } bfd->fh = CreateFile(win32_fname, dwaccess, /* Requested access */ - FILE_SHARE_READ, /* Shared mode */ + FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, /* SecurityAttributes */ OPEN_EXISTING, /* CreationDisposition */ dwflags, /* Flags and attributes */ diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 330d5f49ac..80c52f4e55 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -149,6 +149,7 @@ struct JCR { volatile bool sd_msg_thread_done; /* Set when Storage message thread terms */ BSOCK *ua; /* User agent */ JOB *job; /* Job resource */ + JOB *verify_job; /* Job resource of verify target job */ alist *storage[MAX_STORE]; /* Storage possibilities */ STORE *store; /* Storage daemon selected */ CLIENT *client; /* Client resource */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 22e3efa737..95bcb0d1c0 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION -#define VERSION "1.35.5" -#define BDATE "29 September 2004" -#define LSMDATE "29Sep04" +#define VERSION "1.35.6" +#define BDATE "30 September 2004" +#define LSMDATE "30Sep04" /* Debug flags */ #undef DEBUG