This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
forked from dreyau/bareos_exporter
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from vierbergenlars/fix-issue-10
Regard all filesets with the same name as one fileset
- Loading branch information
Showing
5 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- Reproduction of https://github.com/vierbergenlars/bareos_exporter/issues/10 | ||
|
||
INSERT INTO FileSet (fileset, md5, createtime, filesettext) | ||
VALUES | ||
('FileSetX', 'd41d8cd98f00b204e9800998ecf8427e', NOW() - interval 14 day, ''), | ||
('FileSetX', 'd41d8cd98f00b204e9800998ecf8427f', NOW() - interval 7 day, ''); | ||
|
||
INSERT INTO Job (job, name, type, level, jobstatus, schedtime, starttime, poolid) | ||
VALUES | ||
('cx-fsx.1', 'cx-fsx', 'B', 'F', 'T', NOW() - interval 13 day, NOW() - interval 13 day, (select poolid from Pool WHERE name = 'Pool1')), | ||
('cx-fsx.2', 'cx-fsx', 'B', 'F', 'T', NOW() - interval 6 day, NOW() - interval 6 day, (select poolid from Pool WHERE name = 'Pool1')); | ||
|
||
UPDATE Job j SET | ||
clientid = (SELECT c.clientid from Client c WHERE c.name = 'c1-fd'), | ||
filesetid = (SELECT f.filesetid from FileSet f WHERE f.fileset = 'FileSetX' AND md5 = 'd41d8cd98f00b204e9800998ecf8427e'), | ||
endtime = j.starttime + interval 1 hour | ||
WHERE j.name = 'cx-fsx'; | ||
|
||
UPDATE Job j SET | ||
filesetid = (SELECT f.filesetid from FileSet f WHERE f.fileset = 'FileSetX' AND md5 = 'd41d8cd98f00b204e9800998ecf8427f') | ||
WHERE j.job = 'cx-fsx.2'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- Reproduction of https://github.com/vierbergenlars/bareos_exporter/issues/10 | ||
|
||
INSERT INTO public.fileset (fileset, md5, createtime) | ||
VALUES | ||
('FileSetX', 'd41d8cd98f00b204e9800998ecf8427e', NOW() - interval '2 weeks'), | ||
('FileSetX', 'd41d8cd98f00b204e9800998ecf8427f', NOW() - interval '1 week'); | ||
|
||
INSERT INTO public.job (job, name, type, level, jobstatus, schedtime, starttime, poolid) | ||
VALUES | ||
('cx-fsx.1', 'cx-fsx', 'B', 'F', 'T', NOW() - interval '1 week 6 days', NOW() - interval '1 week 6 days', (select poolid from pool WHERE name = 'Pool1')), | ||
('cx-fsx.2', 'cx-fsx', 'B', 'F', 'T', NOW() - interval '6 days', NOW() - interval '6 days', (select poolid from pool WHERE name = 'Pool1')); | ||
|
||
UPDATE public.job j SET | ||
clientid = (SELECT c.clientid from public.client c WHERE c.name = 'c1-fd'), | ||
filesetid = (SELECT f.filesetid from public.fileset f WHERE f.fileset = 'FileSetX' AND md5 = 'd41d8cd98f00b204e9800998ecf8427e'), | ||
endtime = j.starttime + interval '1h' | ||
WHERE j.name = 'cx-fsx'; | ||
|
||
UPDATE public.job j SET | ||
filesetid = (SELECT f.filesetid from public.fileset f WHERE f.fileset = 'FileSetX' AND md5 = 'd41d8cd98f00b204e9800998ecf8427f') | ||
WHERE j.job = 'cx-fsx.2'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters