]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_dotcmds.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / dird / ua_dotcmds.c
index 0669288b2ce0a35a7d448b36e22706b7f28cf8ef..c90052b2ef6b79460add898e01e8b1801ba82c34 100644 (file)
@@ -123,7 +123,7 @@ static struct cmdstruct commands[] = { /* help */  /* can be used in runscript *
  { NT_(".bvfs_cleanup"), dot_bvfs_cleanup,       NULL,       true},
  { NT_(".bvfs_clear_cache"),dot_bvfs_clear_cache,NULL,       false},
  { NT_(".types"),      typescmd,                 NULL,       false}
-             };
+};
 #define comsize ((int)(sizeof(commands)/sizeof(struct cmdstruct)))
 
 /*
@@ -186,7 +186,10 @@ static bool dot_bvfs_update(UAContext *ua, const char *cmd)
 
    int pos = find_arg_with_value(ua, "jobid");
    if (pos != -1 && is_a_number_list(ua->argv[pos])) {
-      bvfs_update_path_hierarchy_cache(ua->jcr, ua->db, ua->argv[pos]);
+      if (!bvfs_update_path_hierarchy_cache(ua->jcr, ua->db, ua->argv[pos])) {
+         ua->error_msg("ERROR: BVFS reported a problem for %s\n", 
+                       ua->argv[pos]);
+      }
    } else {
       /* update cache for all jobids */
       bvfs_update_cache(ua->jcr, ua->db);
@@ -545,6 +548,12 @@ static bool dot_bvfs_get_jobids(UAContext *ua, const char *cmd)
       return true;
    }
 
+   /* When in level base, we don't rely on any Full/Incr/Diff */
+   if (jr.JobLevel == L_BASE) {
+      ua->send_msg("%s\n", edit_int64(jr.JobId, ed1));
+      return true;
+   }
+
    /* If we have the "all" option, we do a search on all defined fileset
     * for this client
     */