]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/job.c
ebl Modify disk-changer to check if slot contains something before
[bacula/bacula] / bacula / src / filed / job.c
index 9e1f8d2de4f9027db78c1577a9cdf5ed2837a1c0..6c45c3bb9ad488f1881712b04c190f14b9526d65 100644 (file)
@@ -305,6 +305,12 @@ void *handle_client_request(void *dirp)
             for (k=0; k<fo->regex.size(); k++) {
                regfree((regex_t *)fo->regex.get(k));
             }
+            for (k=0; k<fo->regexdir.size(); k++) {
+               regfree((regex_t *)fo->regexdir.get(k));
+            }
+            for (k=0; k<fo->regexfile.size(); k++) {
+               regfree((regex_t *)fo->regexfile.get(k));
+            }
             fo->regex.destroy();
             fo->regexdir.destroy();
             fo->regexfile.destroy();
@@ -315,6 +321,9 @@ void *handle_client_request(void *dirp)
             fo->base.destroy();
             fo->fstype.destroy();
             fo->drivetype.destroy();
+            if (fo->ignoredir != NULL) {
+               free(fo->ignoredir);
+            }
          }
          incexe->opts_list.destroy();
          incexe->name_list.destroy();
@@ -674,7 +683,7 @@ static void add_file_to_fileset(JCR *jcr, const char *fname, findFILESET *filese
       }
       break;
    case '<':
-      Dmsg0(100, "Doing < include on client.\n");
+      Dmsg1(100, "Doing < of '%s' include on client.\n", p + 1);
       p++;                      /* skip over < */
       if ((ffd = fopen(p, "rb")) == NULL) {
          berrno be;
@@ -840,6 +849,11 @@ static void add_fileset(JCR *jcr, const char *item)
       set_options(current_opts, item);
       state = state_options;
       break;
+   case 'Z':
+      current_opts = start_options(ff);
+      current_opts->ignoredir = bstrdup(item);
+      state = state_options;
+      break;
    case 'D':
       current_opts = start_options(ff);
 //    current_opts->reader = bstrdup(item);
@@ -901,6 +915,9 @@ static bool term_fileset(JCR *jcr)
          for (k=0; k<fo->drivetype.size(); k++) {
             Dmsg1(400, "XD %s\n", (char *)fo->drivetype.get(k));
          }
+         if (fo->ignoredir) {
+            Dmsg1(400, "Z %s\n", fo->ignoredir);
+         }
       }
       dlistString *node;
       foreach_dlist(node, &incexe->name_list) {
@@ -1099,6 +1116,9 @@ static void set_options(findFOPTS *fo, const char *opts)
       case 'c':
          fo->flags |= FO_CHKCHANGES;
          break;
+      case 'N':
+         fo->flags |= FO_HONOR_NODUMP;
+         break;
       default:
          Emsg1(M_ERROR, 0, _("Unknown include/exclude option: %c\n"), *p);
          break;
@@ -1480,6 +1500,7 @@ static int backup_cmd(JCR *jcr)
          berrno be;
          Jmsg(jcr, M_WARNING, 0, _("VSS was not initialized properly. VSS support is disabled. ERR=%s\n"), be.bstrerror());
       } 
+      run_scripts(jcr, jcr->RunScripts, "ClientAfterVSS");
    }
 #endif