Closed karlism closed 3 years ago
Can you take a look at what the actual values in the database are at the time that the errors occur?
I'm guessing one of them is NULL
, but I don't know which one, and I don't have such a recent bareos director to test with.
Can you check with the following SQL query, and verify that expired
is only NULL
for newly created volumes that are being written to?
SELECT m.volumename, m.lastwritten, m.volretention, (m.lastwritten + (m.volretention * interval '1s')) < NOW() as expired FROM media m
@vierbergenlars, thanks for looking into this. During backup there is entry in database that has empty lastwritten
and expired
fields:
bareos=# SELECT m.volumename, m.lastwritten, m.volretention, (m.lastwritten + (m.volretention * interval '1s')) < NOW() as expired FROM media m;
volumename | lastwritten | volretention | expired
--------------------------+---------------------+--------------+---------
FullSQL-0004 | 2021-06-24 08:03:20 | 2592000 | f
[...]
IncrementalExchange-0072 | | 1209600 |
[...]
Yes, that explains why expired
becomes NULL
as well.
I'll see to make expired
false
instead of null
, because those new volumes are can never already be expired.
Thanks! It looks like errors are gone after an update to 0.5.7.
I'm running BareOS exporter with BareOS 20.0.1 and PostgreSQL 13 and BareOS exporter produces lots of following errors:
These errors only appear in logs when there are active backup jobs running.
Latest BareOS exporter is used with following flags: