Bacula-users

[Bacula-users] All incremental jobs are upgraded to Full when a full already exists and no changes to FileSet or other job properties have been made

2014-03-25 13:48:15
Subject: [Bacula-users] All incremental jobs are upgraded to Full when a full already exists and no changes to FileSet or other job properties have been made
From: Erik Pinzon <erik AT thechildrenstrust DOT org>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 25 Mar 2014 17:29:17 +0000
We are in the process of replacing a very old (1.38) Bacula installation with a 
newer version of it. The new installation is version 5.2.6, but the same issue 
was present while testing version 5.0.2.
Database is PostgreSQL 9.1 on Debian Squeeze 6.0.9, bacula 5.0.2 is the default 
package and 5.2.6 is available via Debian backports.

The issue is that all Incremental jobs are being upgraded to Full because 
Bacula claims that: "No prior or suitable Full backup found in catalog". This 
happens even after running a full backup manually.

I enabled full logging on the DB and could see Bacula executing the following 
statements; which should result in running an Incremental backup, but the job 
was upgraded to full regardless. Any help on finding what could be wrong with 
my configuration would be much appreciated.

PostgreSQL Log of the job run:

2014-03-25 12:13:42 EDT LOG:  statement: SELECT ClientId,Uname FROM Client 
WHERE Name='iis2-fd'
2014-03-25 12:13:42 EDT LOG:  statement: INSERT INTO Job 
(Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment) VALUES 
('iis2-job.2014-03-25_12.13.42_09','iis2-job','B','I','C','2014-03-25 
12:13:40',1395764020,5,'')

Notice that the job is initially inserted in the DB as level "I" -- Incremental

2014-03-25 12:13:42 EDT LOG:  statement: SELECT currval('Job_Jobid_seq')
2014-03-25 12:13:42 EDT LOG:  statement: SELECT FileSetId,CreateTime FROM 
FileSet WHERE FileSet='iis2-fset' AND MD5='mF/UX5/802/Vv7+2i9/joD'

This query returns 1 row:
filesetid |     createtime
-----------+---------------------
         1 | 2014-03-25 10:45:20
(1 row)

2014-03-25 12:13:42 EDT LOG:  statement: SELECT StartTime, Job FROM Job WHERE 
JobStatus IN ('T','W') AND Type='B' AND Level='F' AND Name='iis2-job' AND 
ClientId=5 AND FileSetId=1 ORDER BY StartTime DESC LIMIT 1

Using the FileSet ID found in the previous query, this query returns 1 row, 
which I assume it indicates that in fact there is at least one successful full 
backup for the same client, job and fileset.
      starttime      |               job
---------------------+---------------------------------
 2014-03-25 12:06:22 | iis2-job.2014-03-25_12.06.19_07
(1 row)

2014-03-25 12:13:42 EDT LOG:  statement: SELECT StartTime, Job FROM Job WHERE 
JobStatus IN ('T','W') AND Type='B' AND Level IN ('I','D','F') AND 
Name='iis2-job' AND ClientId=5 AND FileSetId=1 ORDER BY StartTime DESC LIMIT 1

Bacula seems to ignore the result from the previous query and moves on to try 
to find an incremental, differential or full backup. The query returns:
      starttime      |               job
---------------------+---------------------------------
 2014-03-25 12:06:22 | iis2-job.2014-03-25_12.06.19_07
(1 row)

2014-03-25 12:13:42 EDT LOG:  statement: SELECT StartTime, Job FROM Job WHERE 
JobStatus IN ('T','W') AND Type='B' AND Level='F' AND Name='iis2-job' AND 
ClientId=5 AND FileSetId=1 ORDER BY StartTime DESC LIMIT 1

Here Bacula re-runs the first job query. Same results as above, then it records 
in the logs that no full backup was found and moves on to upgrading the job to 
full.

 2014-03-25 12:13:42 EDT LOG:  statement: INSERT INTO Log (JobId, Time, 
LogText) VALUES (4,'2014-03-25 12:13:42','mgt1-dir JobId 4: ')
2014-03-25 12:13:42 EDT LOG:  statement: INSERT INTO Log (JobId, Time, LogText) 
VALUES (4,'2014-03-25 12:13:42','mgt1-dir JobId 4: No prior or suitable Full 
backup found in catalog. Doing FULL backup.
        ')
2014-03-25 12:13:42 EDT LOG:  statement: SELECT 
PoolId,Name,NumVols,MaxVols,UseOnce,UseCatalog,AcceptAnyVolume,AutoPrune,Recycle,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,MaxVolBytes,PoolType,LabelType,LabelFormat,RecyclePoolId,ScratchPoolId,ActionOnPurge
 FROM Pool WHERE Pool.Name='iis2-pool'
2014-03-25 12:13:42 EDT LOG:  statement: SELECT count(*) from Media WHERE 
PoolId=7
2014-03-25 12:13:44 EDT LOG:  statement: UPDATE Job SET 
JobStatus='R',Level='F',StartTime='2014-03-25 
12:13:44',ClientId=5,JobTDate=1395764024,PoolId=7,FileSetId=1 WHERE JobId=4
2014-03-25 12:13:44 EDT LOG:  statement: UPDATE Job SET 
JobStatus='R',Level='F',StartTime='2014-03-25 
12:13:44',ClientId=5,JobTDate=1395764024,PoolId=7,FileSetId=1 WHERE JobId=4
  
Notice her how now the job has been upgraded to Full even though there was 
clearly a recent (7 minutes old) full backup in the catalog.


Resources for this job:

Client {
  Name = iis2-fd
  Address = iis2.childrenstrust.pvt
  FDPort = 9102
  Catalog = MyCatalog
  Password = "zzzzz"
  File Retention = 30 days
  Job Retention = 3 months
  AutoPrune = yes
}

Job {
  Name = iis2-job
  Client = iis2-fd
  Type = Backup
  Schedule = Regular
  FileSet = iis2-fset
  Max Full Interval = 6 # this entry Should force a full backup every 7 days
  Pool = iis2-pool
  Messages = Standard
  Write Bootstrap = "/opt/bacula/bootstrap/iis2.bsr"
  Full Backup Pool = iis2-pool
  Incremental Backup Pool = iis2-pool
}

Pool {
  Name = iis2-pool
  Storage = iis2-storage
  Pool Type = Backup
  Recycle = yes
  Recycle Oldest Volume = yes
  AutoPrune = yes
  Volume Retention = 14 days   # this entry should remove volumes older than 2 
weeks
  Maximum Volume Jobs = 1
  Maximum Volumes = 16          # keep a couple of extra volumes to accommodate 
 2 weeks of 1 full + 6 incr per week
  Label Format = "${Pool}-vol-${JobId}"
}

Storage {
  Name = iis2-storage
  Address = mgt2.thechildrenstrust.net
  SDPort = 9103
  Password = "zzzzz"
  Device = iis2-device
  Media Type = iis2-mtype
}


FileSet {
  Name = iis2-fset
  Include {
    Options {
      signature = MD5
      Exclude = yes
      IgnoreCase = yes
    }
    File = "C:/CrissCross"
    File = "C:/internal_reports"
    File = "C:/provider_reports"
  }
}


Thank you,

Erik

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] All incremental jobs are upgraded to Full when a full already exists and no changes to FileSet or other job properties have been made, Erik Pinzon <=