View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000793 | bareos-core | director | public | 2017-03-06 14:47 | 2017-12-18 12:12 |
Reporter | matthijs | Assigned To | pstorz | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Debian | OS Version | 8 |
Product Version | 16.2.4 | ||||
Fixed in Version | 17.2.4 | ||||
Summary | 0000793: Always incremental consolidate fails when no files are changed | ||||
Description | Hi, To our knowledge the bug reported at https://bugs.bareos.org/view.php?id=745 has not been resolved yet. We can still reproduce the error consistently. Also the answer "Individual configuration problem, solved by support" does not clarify why this bug would be a configuration problem. Kind regards | ||||
Steps To Reproduce | Director/Job config: Always Incremental Job Retention = 2 days Always Incremental Max Full Age = 4 days Steps: Run the normal job 6 days in a row without changing any files. On each day run the consolidate job as well. The first time the consolidate job needs to process any files there are files from the first normal job which has been upgraded to a Full job. Therefor this time no error is given. After two more days the consolidate job reaches the max Full Age again but this time no files need to be processed because there aren't any changed files. At that moment the error occurs. | ||||
Additional Information | We had a hard time to reproduce the issue but we managed to find the line of code from where the consolidation (virtual full) fails. We reduced this problem to the consolidate job not needing to process any files. In vbackup.c on line 255 you have the message 'Could not get or create the FileSet record.' which we got as a 'Fatal error'. When looking into this we see that the 'create_bootstrap_file' function returns a boolean false. When running bareos-director in debug mode with '/usr/sbin/bareos-dir -d100 -f' we get also the following messages: ... (100): sql_get.c:1272-15 q=SELECT Path.Path, Filename.Name, T1.FileIndex, T1.JobId, LStat, DeltaSeq FROM ( SELECT DISTINCT ON (FilenameId, PathId, DeltaSeq) JobTDate, JobId, FileId, FileIndex, PathId, FilenameId, LStat , DeltaSeq FROM (SELECT FileId, JobId, PathId, FilenameId, FileIndex, LStat ,DeltaSeq FROM File WHERE JobId IN (3,5) UNION ALL SELECT File.FileId, File.JobId, PathId, FilenameId, File.FileIndex, LStat , DeltaSeq FROM BaseFiles JOIN File USING (FileId) WHERE BaseFiles.JobId IN (3,5) ) AS T JOIN Job USING (JobId) ORDER BY FilenameId, PathId, DeltaSeq, JobTDate DESC ) AS T1 JOIN Filename ON (Filename.FilenameId = T1.FilenameId) JOIN Path ON (Path.PathId = T1.PathId) WHERE FileIndex > 0 ORDER BY T1.JobTDate, FileIndex ASC ... (0): vbackup.c:508-15 Found 0 files to consolidate. ... (100): vbackup.c:373-15 Enter backup_cleanup 69 E ... (100): vbackup.c:458-15 Leave vbackup_cleanup() The message: 'Found 0 files to consolidate.' can be found in vbackup.c at line 508. The offending check is on line 510 where it checks the expected files and when the jcr->ExpectedFiles == 0 it returns false. The query as seen in the output above returns 0 rows in our test. The solution for us is now to keep the regular jobs running and when there are 'ExpectedFiles' then it will consolidate the jobs. Hopefully this will help in resolving this issue. | ||||
Tags | No tags attached. | ||||
Would also like to know how to solve this problem with changes of the configuration. | |
I can confirm that this issue is still occurring using Bareos 16.2.7 | |
Thank you for reproducing the problem. i have created a patch and you find packages that contain it here: http://download.bareos.org/bareos/people/pstorz/ai-fails-no-changed-files/ please try to reproduce the problem and give feedback if the problem is fixed. I altered the query that finds the jobs to be consolidated to skip jobs that have no data. Thank you! Philipp |
|
I have setup a test environment and for me the issue has been fixed: Job { Name = "D_sclsnl01-008_backuptest" Enabled = Yes JobDefs = "LinuxJob" Client = sclsnl01-008-fd FileSet = "Linux_backuptest" Always Incremental Job Retention = 4 days Always Incremental Keep Number = 1 Always Incremental Max Full Age = 5 days } +-------+---------------------------+-----------------+---------------------+------+-------+----------+----------+-----------+ | jobid | name | client | starttime | type | level | jobfiles | jobbytes | jobstatus | +-------+---------------------------+-----------------+---------------------+------+-------+----------+----------+-----------+ | 331 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-22 10:47:10 | B | F | 2 | 22 | f | | 332 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-22 10:56:35 | B | F | 2 | 22 | T | | 333 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-22 10:57:04 | B | F | 2 | 22 | T | | 335 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-22 11:28:14 | B | I | 0 | 0 | T | | 337 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-23 01:05:00 | B | I | 0 | 0 | T | | 342 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-24 01:05:00 | B | I | 0 | 0 | T | | 347 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-25 01:05:01 | B | I | 0 | 0 | T | | 352 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-28 01:05:00 | B | I | 0 | 0 | T | | 357 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-29 01:05:01 | B | I | 0 | 0 | T | | 362 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-30 01:05:00 | B | I | 0 | 0 | T | | 365 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-30 09:49:12 | B | I | 0 | 0 | T | | 366 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-30 09:49:42 | B | I | 0 | 0 | T | | 367 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-11-30 09:49:54 | B | I | 0 | 0 | T | | 379 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-12-01 01:05:01 | B | I | 0 | 0 | T | | 384 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-12-02 01:05:00 | B | I | 0 | 0 | T | | 391 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-12-05 01:05:01 | B | I | 2 | 0 | T | | 396 | D_sclsnl01-008_backuptest | sclsnl01-008-fd | 2017-12-06 01:05:00 | B | I | 2 | 0 | T | +-------+---------------------------+-----------------+---------------------+------+-------+----------+----------+-----------+ Consolidate output: 06-Dec 11:05 sclsnl01-008-dir JobId 399: Start Consolidate JobId 399, Job=Consolidate.2017-12-06_11.05.00_35 06-Dec 11:05 sclsnl01-008-dir JobId 399: Looking at always incremental job D_sclsnl01-008_backuptest 06-Dec 11:05 sclsnl01-008-dir JobId 399: D_sclsnl01-008_backuptest: considering jobs older than 02-Dec-2017 11:05:02 for consolidation. 06-Dec 11:05 sclsnl01-008-dir JobId 399: D_sclsnl01-008_backuptest: less than two jobs to consolidate found, doing nothing. Thanks for your support. |
|
Fix committed to bareos bareos-17.2 branch with changesetid 7370. | |
bareos: bareos-17.2 16152d80 2017-11-21 12:04 Ported: N/A Details Diff |
Virtual Backups: skip jobs with no files When looking for jobids to consolidate, we now skip jobs that have no data. This fixes the problem that consolidations fail when no files were changed. Fixes 0000793: Always incremental consolidate fails when no files are changed |
Affected Issues 0000793 |
|
mod - src/cats/sql_get.c | Diff File | ||
bareos: bareos-17.2 85781bfa 2017-12-11 13:35 Ported: N/A Details Diff |
Virtual Backups: skip jobs with no files (fix) When looking for jobids to consolidate, we now skip jobs that have no data. This fixes the problem that consolidations fail when no files were changed. Fixes 0000793: Always incremental consolidate fails when no files are changed |
Affected Issues 0000793 |
|
mod - src/cats/sql_get.c | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-06 14:47 | matthijs | New Issue | |
2017-08-09 06:25 | miniskipper | Note Added: 0002702 | |
2017-11-17 11:35 | joop.martens | Note Added: 0002817 | |
2017-11-21 12:10 | pstorz | Note Added: 0002820 | |
2017-11-21 12:10 | pstorz | Assigned To | => pstorz |
2017-11-21 12:10 | pstorz | Status | new => feedback |
2017-12-06 13:45 | joop.martens | Note Added: 0002832 | |
2017-12-14 11:57 | pstorz | Changeset attached | => bareos bareos-17.2 16152d80 |
2017-12-14 11:57 | joergs | Changeset attached | => bareos bareos-17.2 85781bfa |
2017-12-14 11:57 | joergs | Note Added: 0002837 | |
2017-12-14 11:57 | joergs | Status | feedback => resolved |
2017-12-14 11:57 | joergs | Resolution | open => fixed |
2017-12-18 12:07 | joergs | Relationship added | child of 0000861 |
2017-12-18 12:12 | joergs | Status | resolved => closed |
2017-12-18 12:12 | joergs | Fixed in Version | => 17.2.4 |