View Issue Details

IDProjectCategoryView StatusLast Update
0000951bareos-core[All Projects] Generalpublic2019-10-21 16:32
ReporterameijeirasAssigned Toarogge 
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
Target VersionFixed in Version 
Summary0000951: Differential backup compute date from last incremental
DescriptionI configure a standard backup policy Full (Monthly), Differential (Weekly) and incremental (Daily).

If I configure it using a daily incremental schedule and control differentials and Full using the variables "Max Diff Interval = 6 days" (To perform a Differential backup weekly) and "Max Full Interval = 31 days" (To perform a Full backup monthly), differentials backups date don't be compute since last Full backup date but from the date of the last incremental wrongly. This create problem in the policy (Full, Diff, Inc) because differential backups will not be really differentials and only have data from last incremental.
I a run manually a differential backup or shedule manually, for example: "
Schedule {
 Name = Backup_test
 Run = Level=Full 1st sun at 02:00
 Run = Differential 2nd-5th sun at 02:00
 Run = Level=Incremental mon-sat at 02:00
}
" differentials backups date are compute right since last Full backup
Steps To Reproduceonfigure a policy backup Full, Differential and incremental using this method:

# ---------- Jobs config ---------------
Job {
  Name = Backup_test
  Enabled = yes
  JobDefs = "DefaultJob"
  Messages = Standard
  Type = Backup
  Storage = CabinaFS1
  Client = test-fd
  FileSet = Archivos_test
  Schedule = Backup_test
  Full Backup Pool = test_Mensual
  Differential Backup Pool = test_Semanal
  Incremental Backup Pool = test_Diario
  Pool = test_Mensual
  Max Diff Interval = 6 days
  Max Full Interval = 31 days
}
# ---------- Schedule config ----------------
Schedule {
 Name = Backup_test
 Run = Level=Incremental at 02:00
}
Additional Informationexample config that generate mistaken differential backups:
...
# ---------- Jobs config ---------------
Job {
  Name = Backup_test
  Enabled = yes
  JobDefs = "DefaultJob"
  Messages = Standard
  Type = Backup
  Storage = CabinaFS1
  Client = test-fd
  FileSet = Archivos_test
  Schedule = Backup_test
  Full Backup Pool = test_Mensual
  Differential Backup Pool = test_Semanal
  Incremental Backup Pool = test_Diario
  Pool = test_Mensual
  Max Diff Interval = 6 days
  Max Full Interval = 31 days
}
# ---------- Schedule config ----------------
Schedule {
 Name = Backup_test
 Run = Level=Incremental at 02:00
}


example config that generate right differential backups:
...
Job {
  Name = Backup_test
  Enabled = yes
  JobDefs = "DefaultJob"
  Messages = Standard
  Type = Backup
  Storage = CabinaFS1
  Client = test-fd
  FileSet = Archivos_test
  Schedule = Backup_test
  Full Backup Pool = test_Mensual
  Differential Backup Pool = test_Semanal
  Incremental Backup Pool = test_Diario
  Pool = test_Mensual


}
# ---------- Schedule config ----------------
Schedule {
 Name = Backup_test
 Run = Level=Full 1st sun at 02:00
 Run = Differential 2nd-5th sun at 02:00
 Run = Level=Incremental mon-sat at 02:00
}
...
TagsNo tags attached.
bareos-master: impactyes
bareos-master: actionwill care
bareos-18.2: impactyes
bareos-18.2: actionwill care
bareos-17.2: impactyes
bareos-17.2: actionwill care
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

has duplicate 0001001 closed Problem with the differential backup 

Activities

comfortel

comfortel

2018-10-24 14:17

reporter   ~0003147

Same problem here:
https://bugs.bareos.org/view.php?id=1001
arogge

arogge

2019-01-09 09:04

developer   ~0003168

I just confirmed that this happens at least in 17.2.4 on Ubuntu 16.04. We will try to fix the issue and to find out which versions are affected.
arogge

arogge

2019-01-10 15:03

developer   ~0003169

Can you please try my packages with an applied fix in your environment and make sure this actually fixes the issue for you?

http://download.bareos.org/bareos/people/arogge/951/xUbuntu_16.04/amd64/
arogge_adm

arogge_adm

2019-01-30 13:12

administrator   ~0003227

Fix committed to bareos dev/arogge/bareos-18.2/fix-951 branch with changesetid 10978.
comfortel

comfortel

2019-02-19 11:42

reporter   ~0003269

when can we expect a change in official repo 18.2 for ubuntu?
arogge

arogge

2019-02-19 11:54

developer   ~0003270

AFAICT you haven't even tried the test-packages I provided.

The bug itself is not fixed yet, because my patch is flawed (picks up changes from the latest full or differential instead of the last full).
If you need this fixed soon, you can open a support case or take a look for yourself (the branch with my candidate fix is publicly available on github).
comfortel

comfortel

2019-04-04 13:33

reporter   ~0003312

Hello.

We test Increment and all ok.
jobfiles show 7 and 6 changed files.

Automatically selected FileSet: FileSetBackup_ansible.organisation.pro
+--------+-------+----------+-------------+---------------------+---------------------------------+
| jobid | level | jobfiles | jobbytes | starttime | volumename |
+--------+-------+----------+-------------+---------------------+---------------------------------+
| 20,280 | F | 47,522 | 130,433,828 | 2019-04-04 13:38:20 | Full_ansible.organisation.pro_0781 |
| 20,281 | I | 7 | 761,010 | 2019-04-04 13:40:50 | Incr_ansible.organisation.pro_0782 |
| 20,282 | I | 6 | 2,144 | 2019-04-04 13:55:08 | Incr_ansible.organisation.pro_0783 |
+--------+-------+----------+-------------+---------------------+---------------------------------+
comfortel

comfortel

2019-04-15 09:17

reporter   ~0003335

Automatically selected FileSet: FileSetBackup_ansible.organisation.pro
+--------+-------+----------+-------------+---------------------+---------------------------------+
| jobid | level | jobfiles | jobbytes | starttime | volumename |
+--------+-------+----------+-------------+---------------------+---------------------------------+
| 20,280 | F | 47,522 | 130,433,828 | 2019-04-04 13:38:20 | Full_ansible.organisation.pro_0781 |
| 20,291 | D | 29 | 23,345,104 | 2019-04-12 01:05:02 | Diff_ansible.organisation.pro_0789 |
| 20,292 | I | 6 | 54,832 | 2019-04-13 01:05:02 | Incr_ansible.organisation.pro_0783 |
| 20,293 | I | 0 | 0 | 2019-04-14 01:05:03 | Incr_ansible.organisation.pro_0784 |
| 20,294 | I | 0 | 0 | 2019-04-15 01:05:03 | Incr_ansible.organisation.pro_0786 |
+--------+-------+----------+-------------+---------------------+---------------------------------+
You have selected the following JobIds: 20280,20291,20292,20293,20294
arogge

arogge

2019-04-15 09:35

developer   ~0003336

Thanks for the confirmation.
I'll try to get the patch merged for the next release.
comfortel

comfortel

2019-04-15 14:43

reporter   ~0003337

Thanks
comfortel

comfortel

2019-06-13 16:58

reporter   ~0003392

When will this fix be added?
comfortel

comfortel

2019-08-30 12:23

reporter   ~0003562

Hello. When will this fix be added to upstream?
arogge

arogge

2019-08-30 12:27

developer   ~0003563

The fix didn't pass the review. The implemented behaviour is wrong, so it'll need work.

Related Changesets

bareos: dev/arogge/bareos-18.2/fix-951 f1139d19

2019-01-09 11:57:30

arogge_adm

Ported: N/A

Details Diff
core: make sure jcr->stime is set correctly

Fixes 0000951: Differential backup compute date from last incremental
Previously job.c did not recalculate jcr->stime when upgrading an
incremental job to a differential job due to MaxDiffInterval, thus
backing up only files like an incremental job would do.
This patch sets jcr->stime to the start time of the last full or
differential job in this case.
Affected Issues
0000951
mod - core/src/dird/job.cc Diff File
mod - core/src/include/jcr.h Diff File

Issue History

Date Modified Username Field Change
2018-05-22 18:35 ameijeiras New Issue
2018-10-24 14:17 comfortel Note Added: 0003147
2019-01-07 16:06 arogge Relationship added has duplicate 0001001
2019-01-09 09:04 arogge Note Added: 0003168
2019-01-09 09:04 arogge Assigned To => arogge
2019-01-09 09:04 arogge Status new => confirmed
2019-01-09 12:05 arogge Status confirmed => assigned
2019-01-10 15:03 arogge Note Added: 0003169
2019-01-10 15:03 arogge Status assigned => feedback
2019-01-11 09:10 arogge bareos-master: impact => yes
2019-01-11 09:10 arogge bareos-master: action => will care
2019-01-11 09:10 arogge bareos-18.2: impact => yes
2019-01-11 09:10 arogge bareos-18.2: action => will care
2019-01-11 09:10 arogge bareos-17.2: impact => yes
2019-01-11 09:10 arogge bareos-17.2: action => will care
2019-01-30 13:12 arogge_adm Changeset attached => bareos dev/arogge/bareos-18.2/fix-951 f1139d19
2019-01-30 13:12 arogge_adm Note Added: 0003227
2019-02-19 11:42 comfortel Note Added: 0003269
2019-02-19 11:54 arogge Note Added: 0003270
2019-04-04 13:33 comfortel Note Added: 0003312
2019-04-15 09:17 comfortel Note Added: 0003335
2019-04-15 09:35 arogge Status feedback => assigned
2019-04-15 09:35 arogge Note Added: 0003336
2019-04-15 14:43 comfortel Note Added: 0003337
2019-06-13 16:58 comfortel Note Added: 0003392
2019-08-30 12:23 comfortel Note Added: 0003562
2019-08-30 12:27 arogge Note Added: 0003563