-
Notifications
You must be signed in to change notification settings - Fork 7
BareOS exporter stops working when there multiple filesets with the same name #10
Comments
Can you check the results for the following query: For my case, the first column ( To determine how bareos_exporter can handle this situation, it would be helpful to know how this situation occured. |
Hmm, I tried to reproduce this case, where a job has different filesets, and that appears to work. I have no clue what exactly goes wrong here. @karlism if you can run the query from my previous comment, that would be very helpful. I don't know what to look for exactly yet, but the combination Although it is not enforced in the database schema, I believe |
@vierbergenlars, thanks for looking into this!
Yes, it is possible that fileset has been changed at some point as we are now in process of switching from different backup solution to BareOS so me and my colleagues are doing lots of tests and adjustments to existing BareOS configuration. |
According to this, bareos can have multiple entries with the same fileset name. Bareos will select the newest one. When creating a new fileset record, bareos will first check if one with the same name and MD5 sum exists (https://github.com/bareos/bareos/blob/a89617abc0f40425a1a9faa00c1825200be6777a/core/src/cats/sql_create.cc#L702-L705), if it does not, it will insert a new record (https://github.com/bareos/bareos/blob/a89617abc0f40425a1a9faa00c1825200be6777a/core/src/cats/sql_create.cc#L747-L750). So, multiple filesets with the same name and different ids should be handled. Ideally, they are handled as the single fileset they are. The difference between these is the contents of include/exclude rules, which we don't care about as a metrics exporter. |
There can be multiple entries with the same fileset name present in the fileset table.
Previously, filesets would be indexed by their ID. We shouldn't do that, as there can be multiple filesets with the same name and a different id in the database. This happens when fileset include/exclude configurations are changed. Fixes #10
@vierbergenlars, thanks a lot for fixing this! I will try it out as soon as 0.5.7 binaries are published. |
Previously, filesets would be indexed by their ID. We shouldn't do that, as there can be multiple filesets with the same name and a different id in the database. This happens when fileset include/exclude configurations are changed. Fixes #10
BareOS exporter (version 0.5.6) stops working when there are failed backup jobs:
Here's database entries related to this backup job:
Judging by Prometheus
up
metric, I can see that exporter stopped working around 10:08, thus I conclude that this failure was triggered by jobid 243. I'm using BareOS 20.0.1 and PostgreSQL 13 backend database.The text was updated successfully, but these errors were encountered: