Skip to content

Commit

Permalink
Virtual Backups: skip jobs with no files (fix)
Browse files Browse the repository at this point in the history
When looking for jobids to consolidate, we now skip jobs
that have no data.

This fixes the problem that consolidations fail
when no files were changed.

Fixes #793: Always incremental consolidate fails when no files are changed
  • Loading branch information
joergsteffens committed Dec 11, 2017
1 parent 75d2696 commit 85781bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cats/sql_get.c
Expand Up @@ -1302,7 +1302,7 @@ bool B_DB::accurate_get_jobids(JCR *jcr, JOB_DBR *jr, db_list_ctx *jobids)
"SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles "
"FROM Job JOIN FileSet USING (FileSetId) "
"WHERE ClientId = %s "
"AND JobBytes > 0"
"AND JobFiles > 0 "
"AND Level='D' AND JobStatus IN ('T','W') AND Type='B' "
"AND StartTime > (SELECT EndTime FROM btemp3%s ORDER BY EndTime DESC LIMIT 1) "
"AND StartTime < '%s' "
Expand Down Expand Up @@ -1330,7 +1330,7 @@ bool B_DB::accurate_get_jobids(JCR *jcr, JOB_DBR *jr, db_list_ctx *jobids)
"SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles "
"FROM Job JOIN FileSet USING (FileSetId) "
"WHERE ClientId = %s "
"AND JobBytes > 0"
"AND JobFiles > 0 "
"AND Level='I' AND JobStatus IN ('T','W') AND Type='B' "
"AND StartTime > (SELECT EndTime FROM btemp3%s ORDER BY EndTime DESC LIMIT 1) "
"AND StartTime < '%s' "
Expand Down

0 comments on commit 85781bf

Please sign in to comment.