From: Kern Sibbald Date: Sun, 30 May 2004 15:22:22 +0000 (+0000) Subject: Fix hourly scheduling problem X-Git-Tag: Release-1.34.3~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a0d7d1ee99ae3750af1f9fa63c3b7e5cadd879d;p=bacula%2Fbacula Fix hourly scheduling problem git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1376 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 35f56116b0..1765e921d5 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -23,6 +23,7 @@ Documentation to do: (any release a little bit at a time) - Lookup HP cleaning recommendations. - Lookup HP tape replacement recommendations (see trouble shooting autochanger) - Add more obvious documentation of @ for conf files. +- Document doing table repair Testing to do: (painful) - Test drive polling! @@ -44,6 +45,8 @@ For 1.33 Testing/Documentation: For version 1.35: +- Add All Local Partitions = yes to new style saves. +- Document streams and how to implement them. - On Win95 The error I when I installed 1.34.2 clients: The BACULA-FD file is @@ -96,6 +99,8 @@ For version 1.35: Also 12:00am works fine. 0:00pm also works (which I don't think should). None of the values 12:00pm - 12:59pm work for that matter. - Add level to estimate command. +- For each job type (Admin, Restore, ...) require only the really necessary + fields. - Fix option 2 of restore -- list where file is backed up -- require Client, then list last 20 backups. - Add all pools in Dir conf to DB also update them to catch changed diff --git a/bacula/src/dird/query.sql b/bacula/src/dird/query.sql index b5da412209..9495f2c1f4 100644 --- a/bacula/src/dird/query.sql +++ b/bacula/src/dird/query.sql @@ -52,6 +52,7 @@ Select Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobBytes,VolumeN AND JobStatus='T' AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId AND Job.StartTime >= '%2' + GROUP BY Job.JobId ORDER BY Job.StartTime; # 6 :List all backups for a Client @@ -62,6 +63,7 @@ Select Job.JobId,Client.Name as Client,Level,StartTime,JobFiles,JobBytes,VolumeN AND Client.ClientId=Job.ClientId AND JobStatus='T' AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId + GROUP BY Job.JobId ORDER BY Job.StartTime; # 7 :List Volume Attributes for a selected Volume: diff --git a/bacula/src/dird/run_conf.c b/bacula/src/dird/run_conf.c index 216e5bb864..9986f75eaf 100644 --- a/bacula/src/dird/run_conf.c +++ b/bacula/src/dird/run_conf.c @@ -401,7 +401,7 @@ void store_run(LEX *lc, RES_ITEM *item, int index, int pass) /* NOT REACHED */ } if (!have_hour) { - clear_bit(0, lrun.hour); + clear_bits(0, 23, lrun.hour); } p = strchr(lc->str, ':'); if (!p) { diff --git a/bacula/src/dird/ua_prune.c b/bacula/src/dird/ua_prune.c index ddcd7dd299..99cc852e2f 100644 --- a/bacula/src/dird/ua_prune.c +++ b/bacula/src/dird/ua_prune.c @@ -500,7 +500,7 @@ int prune_volume(UAContext *ua, MEDIA_DBR *mr) } if (cnt.count == 0) { - if (ua->verbose) { + if (strcmp(mr->VolStatus, "Purged") != 0 && verbose) { bsendmsg(ua, "There are no Jobs associated with Volume \"%s\". Marking it purged.\n", mr->VolumeName); } diff --git a/bacula/src/version.h b/bacula/src/version.h index 058077b0ae..89eb4a18e5 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,7 +2,7 @@ #undef VERSION #define VERSION "1.34.3" #define VSTRING "1" -#define BDATE "28 May 2004" +#define BDATE "30 May 2004" #define LSMDATE "28May04" /* Debug flags */ diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index 736cc2c188..3150a93841 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -970,7 +970,7 @@ open_bpipe(char *prog, int wait, const char *mode) // Create a pipe for the child process's STDIN. - if (! CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) { + if (!CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) { ErrorExit("Stdin pipe creation failed\n"); goto cleanup; } @@ -990,10 +990,10 @@ open_bpipe(char *prog, int wait, const char *mode) } // spawn program with redirected handles as appropriate bpipe->worker_pid = (pid_t) - CreateChildProcess(prog, // commandline - hChildStdinRd, // stdin HANDLE - hChildStdoutWr, // stdout HANDLE - hChildStdoutWr);// stderr HANDLE + CreateChildProcess(prog, // commandline + hChildStdinRd, // stdin HANDLE + hChildStdoutWr, // stdout HANDLE + hChildStdoutWr); // stderr HANDLE if ((HANDLE) bpipe->worker_pid == INVALID_HANDLE_VALUE) goto cleanup; @@ -1007,14 +1007,18 @@ open_bpipe(char *prog, int wait, const char *mode) // detect eof. // ugly but convert WIN32 HANDLE to FILE* int rfd = _open_osfhandle((long)hChildStdoutRdDup, O_RDONLY); - bpipe->rfd = _fdopen(rfd, "r"); + if (rfd >= 0) { + bpipe->rfd = _fdopen(rfd, "r"); + } } if (mode_write) { CloseHandle(hChildStdinRd); // close our read side so as not // to interfre with child's copy // ugly but convert WIN32 HANDLE to FILE* int wfd = _open_osfhandle((long)hChildStdinWrDup, O_WRONLY); - bpipe->wfd = _fdopen(wfd, "w"); + if (wfd >= 0) { + bpipe->wfd = _fdopen(wfd, "w"); + } } if (wait > 0) { @@ -1058,11 +1062,9 @@ close_bpipe(BPIPE *bpipe) if (bpipe->wait) { int remaining_wait = bpipe->wait; - do - { + do { DWORD exitCode; - if (!GetExitCodeProcess((HANDLE)bpipe->worker_pid, &exitCode)) - { + if (!GetExitCodeProcess((HANDLE)bpipe->worker_pid, &exitCode)) { const char *err = errorString(); rval = GetLastError(); d_msg(__FILE__, __LINE__, 0,