View Issue Details

IDProjectCategoryView StatusLast Update
0001374bareos-coreGeneralpublic2021-12-21 13:58
Reporterloli10K Assigned Topstorz  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version20.04
Product Version20.0.2 
Summary0001374: AlwaysIncremental Backup Scheme: Consolidate job does not honor "Always Incremental Job Retention" with empty Incrementals
DescriptionThis happened during the latest vacation period when no one was using the fileserver and incremental jobs were always "empty" (no filesystem changes): the number of incrementals kept growing but the consolidate job would always terminate with the following message "less than two jobs to consolidate found, doing nothing".

Starting bareos-dir manually with "-d 100" shows the consolidate job ignoring all jobs with "JobFiles == 0": this could lead to an endless chain of incremental jobs that cannot be consolidated. Is this behaviour intentional (skip empty jobs)?
Steps To Reproduce1. configure job with AlwaysIncremental backup scheme and a FileSet with mostly static files

--- BEGIN CONF ---
  Level = Incremental
  Always Incremental = Yes
  Always Incremental Job Retention = 7 days
  Always Incremental Keep Number = 7
  Accurate = yes
  Pool = AI-Incremental
  Full Backup Pool = AI-Consolidated
  FileSet = "RarelyChangingFiles"
--- END CONF ---

2. configure daily schedule running aforementioned job

3. wait "Always Incremental Job Retention + some" days

4. run consolidate job

5. consolidate job ignores all incrementals with JobFiles == 0 and doesn't consolidate anything
Tagsalways incremental, consolidate

Relationships

related to 0001402 closedarogge Release Bareos 20.0.5 
related to 0001289 closedarogge Release Bareos 21.0.0 

Activities

loli10K

loli10K

2021-07-23 10:06

reporter  

bareos-dir.txt (20,229 bytes)   
bareos-dir (100): lib/bsock.cc:84-0 Construct BareosSocket
bareos-dir (100): lib/jcr.cc:195-0 Construct JobControlRecord
bareos-dir (100): dird/storage.cc:152-0 write_storage_list=File
bareos-dir (100): dird/storage.cc:162-0 write_storage=File where=Job resource
bareos-dir (100): dird/job.cc:1558-0 JobId=0 created Job=-Console-.2021-07-23_07.18.51_04
bareos-dir (50): lib/cram_md5.cc:105-0 send: auth cram-md5 <439915846.1627024731@R_DIRECTOR::bareos-dir> ssl=0
bareos-dir (50): lib/cram_md5.cc:134-0 Authenticate OK FbjTkabpe5Vzuf4+TdeLyg
bareos-dir (100): lib/cram_md5.cc:166-0 cram-get received: auth cram-md5 <1391000987.1627024731@php-bsock> ssl=0
bareos-dir (50): lib/cram_md5.cc:60-0 my_name: <R_DIRECTOR::bareos-dir> - challenge_name: <php-bsock>
bareos-dir (99): lib/cram_md5.cc:231-0 sending resp to challenge: t4gnTG02NWMSR4+Mo6R/fC
bareos-dir (10): dird/ua_audit.cc:142-0 : Console [admin] from [127.0.0.1] cmdline run job="Consolidate" yes
bareos-dir (100): dird/ua_db.cc:150-0 UA Open database
bareos-dir (100): cats/sql_pooling.cc:60-0 DbSqlGetNonPooledConnection allocating 1 new non pooled database connection to database bareos, backend type postgresql
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename dbi, partly_compare = true
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename mysql, partly_compare = false
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename postgresql, partly_compare = false
bareos-dir (100): cats/postgresql.cc:1027-0 DB REopen bareos
bareos-dir (100): dird/ua_run.cc:2129-0 Using pool AI-Incremental
bareos-dir (100): dird/ua_run.cc:2143-0 Using next pool AI-Consolidated
bareos-dir (100): lib/jcr.cc:195-0 Construct JobControlRecord
bareos-dir (100): dird/storage.cc:152-0 write_storage_list=File
bareos-dir (100): dird/storage.cc:162-0 write_storage=File where=Job resource
bareos-dir (50): dird/storage.cc:187-0 write_storage=FileIncremental where=Pool resource
bareos-dir (100): dird/ua_run.cc:517-0 JobId=0 using pool AI-Incremental priority=10
bareos-dir (100): dird/job.cc:1558-0 JobId=0 created Job=Consolidate.2021-07-23_07.18.51_05
bareos-dir (100): dird/job.cc:190-0 Open database
bareos-dir (100): cats/sql_pooling.cc:60-0 DbSqlGetNonPooledConnection allocating 1 new non pooled database connection to database bareos, backend type postgresql
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename dbi, partly_compare = true
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename mysql, partly_compare = false
bareos-dir (100): cats/cats_backends.cc:79-0 db_init_database: Trying to find mapping of given interfacename postgresql to mapping interfacename postgresql, partly_compare = false
bareos-dir (100): cats/postgresql.cc:1027-0 DB REopen bareos
bareos-dir (100): cats/sql_query.cc:131-0 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Uname FROM Client WHERE Name='bareos-fd'
bareos-dir (100): dird/job.cc:1405-0 Created Client bareos-fd record 1
bareos-dir (100): dird/job.cc:232-0 Created job record JobId=33 Name=Consolidate.2021-07-23_07.18.51_05 Type=O Level=F
bareos-dir (100): dird/ua_run.cc:523-0 JobId=33 NewJobId=33 using pool AI-Incremental priority=10
bareos-dir (50): dird/jobq.cc:904-0 Inc Job=Consolidate rncj=1
bareos-dir (100): lib/jcr.cc:278-0 FreeCommonJcr: 7fe26c000e50 
bareos-dir (100): lib/bsock.cc:136-0 Destruct BareosSocket
bareos-dir (100): lib/bsock.cc:84-0 Construct BareosSocket
bareos-dir (100): lib/jcr.cc:195-0 Construct JobControlRecord
bareos-dir (100): dird/storage.cc:152-0 write_storage_list=File
bareos-dir (100): dird/storage.cc:162-0 write_storage=File where=Job resource
bareos-dir (100): dird/job.cc:1558-0 JobId=0 created Job=-Console-.2021-07-23_07.18.53_06
bareos-dir (50): lib/cram_md5.cc:105-0 send: auth cram-md5 <54017212.1627024733@R_DIRECTOR::bareos-dir> ssl=0
bareos-dir (50): lib/cram_md5.cc:134-0 Authenticate OK 3wQbsPYvHaCjQ+o/pA5uDg
bareos-dir (100): lib/cram_md5.cc:166-0 cram-get received: auth cram-md5 <7225644114.1627024733@php-bsock> ssl=0
bareos-dir (50): lib/cram_md5.cc:60-0 my_name: <R_DIRECTOR::bareos-dir> - challenge_name: <php-bsock>
bareos-dir (99): lib/cram_md5.cc:231-0 sending resp to challenge: 38QJ69/CSi/AK4IZv+MHkB
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query UPDATE Job SET JobStatus='R',Level='F',StartTime='2021-07-23 07:18:53',ClientId=1,JobTDate=1627024733,PoolId=0,FileSetId=0 WHERE JobId=33
bareos-dir (100): lib/jcr.cc:278-0 FreeCommonJcr: 7fe26c000e50 
bareos-dir (100): lib/bsock.cc:136-0 Destruct BareosSocket
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query UPDATE Job SET JobStatus='R',Level='F',StartTime='2021-07-23 07:18:53',ClientId=1,JobTDate=1627024733,PoolId=0,FileSetId=0 WHERE JobId=33
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:53','bareos-dir JobId 33: Start Consolidate JobId 33, Job=Consolidate.2021-07-23_07.18.51_05
')
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:53','bareos-dir JobId 33: Looking at always incremental job BackupCatalog
')
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT FileSetId,CreateTime FROM FileSet WHERE FileSet='Catalog' AND MD5='Y9gUE3Mi1UIy95+cHC/mUC'
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Uname FROM Client WHERE Name='bareos-fd'
bareos-dir (100): dird/job.cc:1405-33 Created Client bareos-fd record 1
bareos-dir (100): cats/sql_query.cc:104-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name create_temp_accurate_jobids (36)
bareos-dir (100): cats/sql_query.cc:109-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-23 07:18:54' AND FileSet.FileSetId = 1 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-23 07:18:54' AND FileSet.FileSetId = 1 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='D' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-23 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 1) ORDER BY Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='I' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-23 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 1) ORDER BY Job.JobTDate DESC 
bareos-dir (1): cats/sql_get.cc:1412-33 db_accurate_get_jobids=
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btemp333
bareos-dir (10): dird/consolidate.cc:160-33 unlimited jobids list:  .
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: BackupCatalog: considering jobs older than 16-Jul-2021 07:18:53 for consolidation.
')
bareos-dir (10): dird/consolidate.cc:176-33 BackupCatalog: considering jobs with ClientId 1 and FilesetId 1 older than 16-Jul-2021 07:18:53 for consolidation.
bareos-dir (100): cats/sql_query.cc:104-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name create_temp_accurate_jobids (36)
bareos-dir (100): cats/sql_query.cc:109-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSetId = 1 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSetId = 1 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='D' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 1) ORDER BY Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='I' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 1) ORDER BY Job.JobTDate DESC 
bareos-dir (1): cats/sql_get.cc:1412-33 db_accurate_get_jobids=
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btemp333
bareos-dir (10): dird/consolidate.cc:184-33 consolidate candidates:  .
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: BackupCatalog: less than two jobs to consolidate found, doing nothing.
')
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: Looking at always incremental job backup-bareos-fd
')
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT FileSetId,CreateTime FROM FileSet WHERE FileSet='MyFileSet' AND MD5='GXlxp7/utAlwrD/8o60O5C'
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT ClientId,Uname FROM Client WHERE Name='bareos-fd'
bareos-dir (100): dird/job.cc:1405-33 Created Client bareos-fd record 1
bareos-dir (100): cats/sql_query.cc:104-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name create_temp_accurate_jobids (36)
bareos-dir (100): cats/sql_query.cc:109-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-23 07:18:55' AND FileSet.FileSetId = 3 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-23 07:18:55' AND FileSet.FileSetId = 3 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='D' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-23 07:18:55' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 3) ORDER BY Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='I' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-23 07:18:55' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 3) ORDER BY Job.JobTDate DESC 
bareos-dir (1): cats/sql_get.cc:1412-33 db_accurate_get_jobids=10
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btemp333
bareos-dir (10): dird/consolidate.cc:160-33 unlimited jobids list:  10.
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: backup-bareos-fd: considering jobs older than 16-Jul-2021 07:18:53 for consolidation.
')
bareos-dir (10): dird/consolidate.cc:176-33 backup-bareos-fd: considering jobs with ClientId 1 and FilesetId 3 older than 16-Jul-2021 07:18:53 for consolidation.
bareos-dir (100): cats/sql_query.cc:104-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) with query name create_temp_accurate_jobids (36)
bareos-dir (100): cats/sql_query.cc:109-33 called: void BareosDb::FillQueryVaList(PoolMem&, BareosDbQueryEnum::SQL_QUERY, __va_list_tag*) query is now CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSetId = 3 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query CREATE TABLE btemp333 AS SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND Level = 'F' AND JobStatus IN ('T', 'W') AND Type = 'B' AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSetId = 3 ORDER BY Job.JobId DESC, Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='D' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 3) ORDER BY Job.JobTDate DESC LIMIT 1 
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO btemp333 (JobId, StartTime, EndTime, JobTDate, PurgedFiles) SELECT JobId, StartTime, EndTime, JobTDate, PurgedFiles FROM Job JOIN FileSet USING (FileSetId) WHERE ClientId = 1 AND JobFiles > 0 AND Level='I' AND JobStatus IN ('T','W') AND Type='B' AND StartTime > (SELECT EndTime FROM btemp333 ORDER BY EndTime DESC LIMIT 1) AND StartTime < '2021-07-16 07:18:54' AND FileSet.FileSet= (SELECT FileSet FROM FileSet WHERE FileSetId = 3) ORDER BY Job.JobTDate DESC 
bareos-dir (1): cats/sql_get.cc:1412-33 db_accurate_get_jobids=10
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query DROP TABLE btemp333
bareos-dir (10): dird/consolidate.cc:184-33 consolidate candidates:  10.
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: backup-bareos-fd: less than two jobs to consolidate found, doing nothing.
')
bareos-dir (100): dird/consolidate.cc:349-33 Enter backup_cleanup()
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query UPDATE Job SET JobStatus='T',Level='I',EndTime='2021-07-23 07:18:54',ClientId=1,JobBytes=0,ReadBytes=0,JobFiles=0,JobErrors=0,VolSessionId=0,VolSessionTime=0,PoolId=0,FileSetId=3,JobTDate=1627024734,RealEndTime='2021-07-23 07:18:54',PriorJobId=0,HasBase=0,PurgedFiles=0 WHERE JobId=33
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query SELECT VolSessionId,VolSessionTime,PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus,Type,Level,ClientId,Name,PriorJobId,RealEndTime,JobId,FileSetId,SchedTime,RealEndTime,ReadBytes,HasBase,PurgedFiles FROM Job WHERE JobId=33
bareos-dir (100): cats/sql_query.cc:131-33 called: bool BareosDb::SqlQuery(const char*, int) with query INSERT INTO Log (JobId, Time, LogText) VALUES (33,'2021-07-23 07:18:54','bareos-dir JobId 33: BAREOS 20.0.1 (02Mar21): 23-Jul-2021 07:18:54
  JobId:                  33
  Job:                    Consolidate.2021-07-23_07.18.51_05
  Scheduled time:         23-Jul-2021 07:18:51
  Start time:             23-Jul-2021 07:18:53
  End time:               23-Jul-2021 07:18:54
  Bareos binary info:     bareos.org build: Get official binaries and vendor support on bareos.com
  Job triggered by:       User
  Termination:            Consolidate OK

')
bareos-dir (100): dird/consolidate.cc:397-33 Leave ConsolidateCleanup()
bareos-dir (50): dird/job.cc:680-33 ======== End Job stat=T ==========
bareos-dir (50): dird/jobq.cc:920-0 Dec Job=Consolidate rncj=0
bareos-dir (100): lib/bsys.cc:83-0 safe_unlink unlinking: /var/lib/bareos/bareos-dir.Consolidate.2021-07-23_07.18.51_05.1811978720.mail
bareos-dir (100): lib/bsys.cc:627-0 write_last_jobs seek to 192
bareos-dir (100): lib/jcr.cc:278-0 FreeCommonJcr: 7fe26c0082c0 

bareos-dir.txt (20,229 bytes)   
bareos-webui.png (84,846 bytes)   
bareos-webui.png (84,846 bytes)   
loli10K

loli10K

2021-07-23 10:08

reporter  

bareos-webui-jobs.png (117,908 bytes)   
bareos-webui-jobs.png (117,908 bytes)   
loli10K

loli10K

2021-07-23 10:09

reporter  

bareos-webui-consolidate.png (102,684 bytes)   
bareos-webui-consolidate.png (102,684 bytes)   
frank

frank

2021-07-23 10:52

developer   ~0004192

Last edited: 2021-07-23 11:40

This is currently intended behaviour, see: https://github.com/bareos/bareos/blob/a89617abc0f40425a1a9faa00c1825200be6777a/core/src/cats/sql_get.cc#L1346 .

This might be an issue we need to investigate.

bruno-at-bareos

bruno-at-bareos

2021-10-11 11:52

manager   ~0004295

We got an internal support ticket TT4200825 related to this one too. For keeping cross-reference
bruno-at-bareos

bruno-at-bareos

2021-11-24 14:45

manager   ~0004359

PR995 for fixing is now open see https://github.com/bareos/bareos/pull/995
pstorz

pstorz

2021-11-26 12:22

administrator   ~0004366

Fix committed to bareos master branch with changesetid 15486.

Related Changesets

bareos: master 2a95b75b

2021-11-23 17:17

Alaa Eddine Elamri


Committer: pstorz

Ported: N/A

Details Diff
cats: making bareos able to consolidate zero-file incremental backups

Fixes 0001374 : AlwaysIncremental Backup Scheme: Consolidate job does not
honor "Always Incremental Job Retention" with empty Incrementals
Affected Issues
0001374
mod - core/src/cats/sql_get.cc Diff File

Issue History

Date Modified Username Field Change
2021-07-23 10:06 loli10K New Issue
2021-07-23 10:06 loli10K Tag Attached: always incremental
2021-07-23 10:06 loli10K File Added: bareos-dir.txt
2021-07-23 10:06 loli10K File Added: bareos-webui.png
2021-07-23 10:06 loli10K Tag Attached: consolidate
2021-07-23 10:08 loli10K File Added: bareos-webui-jobs.png
2021-07-23 10:09 loli10K File Added: bareos-webui-consolidate.png
2021-07-23 10:52 frank Note Added: 0004192
2021-07-23 10:53 frank Assigned To => frank
2021-07-23 10:53 frank Status new => feedback
2021-07-23 11:35 frank Note Edited: 0004192
2021-07-23 11:36 frank Assigned To frank =>
2021-07-23 11:36 frank Status feedback => acknowledged
2021-07-23 11:38 frank Note Edited: 0004192
2021-07-23 11:40 frank Note Edited: 0004192
2021-10-11 11:52 bruno-at-bareos Note Added: 0004295
2021-11-24 14:45 bruno-at-bareos Note Added: 0004359
2021-11-26 12:22 pstorz Changeset attached => bareos master 2a95b75b
2021-11-26 12:22 pstorz Note Added: 0004366
2021-11-26 12:22 pstorz Assigned To => pstorz
2021-11-26 12:22 pstorz Status acknowledged => resolved
2021-11-26 12:22 pstorz Resolution open => fixed
2021-12-20 14:01 arogge Relationship added related to 0001402
2021-12-20 14:01 arogge Status resolved => closed
2021-12-21 13:58 arogge Relationship added related to 0001289