]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/restore.c
Jobq.c race bug fixed + minor updates
[bacula/bacula] / bacula / src / dird / restore.c
index 47e6bd4db2c34206031ea43c9ac3a06dd15be1f6..082877a878c6f66274a4205329058e65094feeda 100644 (file)
@@ -265,7 +265,7 @@ int do_restore(JCR *jcr)
 static void restore_cleanup(JCR *jcr, int TermCode)
 {
    char sdt[MAX_TIME_LENGTH], edt[MAX_TIME_LENGTH];
-   char ec1[30], ec2[30];
+   char ec1[30], ec2[30], ec3[30];
    char term_code[100], fd_term_msg[100], sd_term_msg[100];
    char *term_msg;
    int msg_type;
@@ -279,7 +279,11 @@ static void restore_cleanup(JCR *jcr, int TermCode)
    msg_type = M_INFO;                /* by default INFO message */
    switch (TermCode) {
    case JS_Terminated:
-      term_msg = _("Restore OK");
+      if (jcr->ExpectedFiles > jcr->jr.JobFiles) {
+         term_msg = _("Restore OK -- warning file count mismatch");
+      } else {
+         term_msg = _("Restore OK");
+      }
       break;
    case JS_FatalError:
    case JS_ErrorTerminated:
@@ -326,10 +330,11 @@ Job:                    %s\n\
 Client:                 %s\n\
 Start time:             %s\n\
 End time:               %s\n\
+Files Expected:         %s\n\
 Files Restored:         %s\n\
 Bytes Restored:         %s\n\
 Rate:                   %.1f KB/s\n\
-Non-fatal FD Errors:    %d\n\
+FD Errors:              %d\n\
 FD termination status:  %s\n\
 SD termination status:  %s\n\
 Termination:            %s\n\n"),
@@ -339,8 +344,9 @@ Termination:            %s\n\n"),
        jcr->client->hdr.name,
        sdt,
        edt,
-       edit_uint64_with_commas((uint64_t)jcr->jr.JobFiles, ec1),
-       edit_uint64_with_commas(jcr->jr.JobBytes, ec2),
+       edit_uint64_with_commas((uint64_t)jcr->ExpectedFiles, ec1),
+       edit_uint64_with_commas((uint64_t)jcr->jr.JobFiles, ec2),
+       edit_uint64_with_commas(jcr->jr.JobBytes, ec3),
        (float)kbps,
        jcr->Errors,
        fd_term_msg,