Hello everyone,

I have a Bacula 7.4.4 installed on a Debian Stretch. I set it up when it was a 5.2.6 version. I want to have a 35 days retention for "flat files". I set File retention and Job retention to 35 days on each client declared.

Client {
  Name = ...-fd
  Address = ...
  FDPort = 9102
  Catalog = Catalog1
  Password = "..."          # password for FileDaemon
  File Retention = 35 days              # 1 Month
  Job Retention = 35 days               # 1 Month
  AutoPrune = yes                       # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}

To restore a 30 days old file, I need at least one full backup that may be older than 30 days. To keep 2 full backup, I set up volume Retention to 70 days:

Pool {
  Name = POL-35D
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  LabelFormat = "Vol"
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 70 days          # one month
  Maximum Volume Bytes = 50G          # Limit Volume size to something 
reasonable
  Maximum Volumes = 200               # Limit number of Volumes in Pool
  Recycle Oldest Volume = yes
  RecyclePool = Scratch
}


I used to have Volume Retention set to 35 days before, I changed that recently. Today, I checked in the PostgreSQL database:

bacula=#  select volumename, pool.name, volstatus, media.enabled, 
media.recycle, media.actiononpurge, media.volretention from media
bacula-#  left join pool using(poolid)
bacula-#  where pool.name='POL-35D';

 volumename |  name   | volstatus | enabled | recycle | actiononpurge | 
volretention
------------+---------+-----------+---------+---------+---------------+--------------
 Vol0083    | POL-35D | Full      |       1 |       1 |             1 |      
6048000
 Vol0053    | POL-35D | Full      |       1 |       1 |             1 |      
6048000
      [...]
 Vol0036    | POL-35D | Append    |       1 |       1 |             0 |      
6048000
      [...]
 Vol0054    | POL-35D | Full      |       1 |       1 |             1 |      
6048000
      (54 lignes)

Any volume in the pool has the same volretention : 70 days.

Here is the schedule I use:

Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sat at 22:05
  Run = Differential 2nd-5th sat at 22:05
  Run = Incremental sun-fri at 22:05
}

The problem is the following: The full backup is pruned too quickly.
To restore a 30 days old, sometimes, I need a full older than 30 days (to use the differential then the incremental I need)

Here is what I have for a specific client:

bacula=# select job, type, level, starttime, jobtdate from job
bacula-# where name='Backup_carina'
bacula-# order by schedtime;
                 job                  | type | level | starttime      |  jobtdate
--------------------------------------+------+-------+---------------------+------------
 Backup_carina.2018-05-20_12.05.00_47 | B    | I     | 2018-05-20 12:26:00 | 1526812010  Backup_carina.2018-05-21_12.05.00_24 | B    | I     | 2018-05-21 12:26:30 | 1526898461  Backup_carina.2018-05-22_12.05.00_21 | B    | I     | 2018-05-22 12:35:49 | 1526985397  Backup_carina.2018-05-23_12.05.00_08 | B    | I     | 2018-05-23 12:31:07 | 1527071535  Backup_carina.2018-05-24_12.05.00_40 | B    | I     | 2018-05-24 12:05:02 | 1527156349  Backup_carina.2018-05-25_12.05.00_12 | B    | I     | 2018-05-25 12:05:02 | 1527242745  Backup_carina.2018-05-26_12.05.00_44 | B    | D     | 2018-05-26 12:05:03 | 1527329230  Backup_carina.2018-05-27_12.05.00_17 | B    | I     | 2018-05-27 12:05:03 | 1527415549  Backup_carina.2018-05-28_12.05.00_49 | B    | I     | 2018-05-28 12:05:03 | 1527501962  Backup_carina.2018-05-29_12.05.00_22 | B    | I     | 2018-05-29 12:32:24 | 1527589991  Backup_carina.2018-05-30_12.05.00_00 | B    | I     | 2018-05-30 12:05:02 | 1527674746  Backup_carina.2018-05-31_12.05.00_30 | B    | I     | 2018-05-31 12:05:03 | 1527761144  Backup_carina.2018-06-01_12.05.00_00 | B    | I     | 2018-06-01 12:05:02 | 1527847545  Backup_carina.2018-06-02_12.05.00_30 | B    | F     | 2018-06-02 12:18:09 | 1527935475  Backup_carina.2018-06-03_12.05.00_00 | B    | I     | 2018-06-03 12:05:02 | 1528020348  Backup_carina.2018-06-04_12.05.00_30 | B    | I     | 2018-06-04 12:05:02 | 1528106747  Backup_carina.2018-06-05_12.05.00_34 | B    | I     | 2018-06-05 12:15:52 | 1528193799
[...]

The full backup worked fine at beginning of June. But the May's full backup has been pruned. I can not restore data pieces from backups prior to 2 of June. I would need at least one full and one differential to: have something working.

I am wrong somewhere but I can't identify what I did wrong.

Do you have some things I could investigate to identify why my full backups are pruned too quickly ?

Kind regards.
Jérôme Blion.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to