View Issue Details

IDProjectCategoryView StatusLast Update
0000951bareos-coreGeneralpublic2024-04-24 09:13
Reporterameijeiras Assigned Toarogge  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
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.

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

manager   ~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

manager   ~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

manager   ~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

manager   ~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

manager   ~0003563

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

comfortel

2020-03-06 13:25

reporter   ~0003887

Hello. There will be no correction?
arogge

arogge

2020-03-06 13:43

manager   ~0003888

There is no immediate plan to fix this. This is only an issue if your job upgrades to Differential because of "Max Diff Interval" and have Accurate disabled, which is discouraged.
As I already wrote: if you need it fixed soon, you can open a support case or take a look for yourself.
comfortel

comfortel

2020-03-06 14:18

reporter   ~0003889

Thanks, we try enable "Accurate" asap.
comfortel

comfortel

2020-03-20 12:43

reporter   ~0003898

We use "Accurate" and all ok. Thanks.
arogge

arogge

2024-04-24 09:13

manager   ~0005905

Moved to GitHub: https://github.com/bareos/bareos/issues/1785

Related Changesets

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

2019-01-09 12:57

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-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
2020-03-06 13:25 comfortel Note Added: 0003887
2020-03-06 13:43 arogge Note Added: 0003888
2020-03-06 14:18 comfortel Note Added: 0003889
2020-03-20 12:43 comfortel Note Added: 0003898
2024-04-24 09:13 arogge Status assigned => closed
2024-04-24 09:13 arogge Note Added: 0005905