]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix hourly scheduling problem
authorKern Sibbald <kern@sibbald.com>
Sun, 30 May 2004 15:22:22 +0000 (15:22 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 30 May 2004 15:22:22 +0000 (15:22 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1376 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/query.sql
bacula/src/dird/run_conf.c
bacula/src/dird/ua_prune.c
bacula/src/version.h
bacula/src/win32/compat/compat.cpp

index 35f56116b0a40aac28855842192b080a758f4aee..1765e921d5288aa9d6b86548cb4d973aff1f71a3 100644 (file)
@@ -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
index b5da412209385fbee550487769cdb2a3ee2bf57d..9495f2c1f44683abd280f7dd4d9ef4a9c486e341 100644 (file)
@@ -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:
index 216e5bb864990486fcd70f29d255bddd7ae38fc6..9986f75eafaa412fbae48e71edb57c213bcdee8a 100644 (file)
@@ -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)  {
index ddcd7dd29900e2ba76c29998ac3cd69547fd0ece..99cc852e2f00146d767bdcc5cc861b0846ede2c9 100644 (file)
@@ -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);
       }
index 058077b0ae447b6f9f45996523e8eedab255bed6..89eb4a18e54620800129561e2268cda0191759de 100644 (file)
@@ -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 */
index 736cc2c18892d95f9b8ec082692d1392ef04bfa8..3150a93841ef5a0377e078bc995a7696af2d55c9 100644 (file)
@@ -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,