On 2/26/22 03:48, Marcelo Slon wrote: > Thanks a lot for your answers. > I will analyze and do my tests. > I'm using Bacula Community version 9.6.7 with PostgreSQL, and in the database > I found a 'status' table with the following data:
[...snip...] > As you can see it doesn't have the 'W' status that you use in the SQL query. > Does this jobstatus exist in my bacula version or is this table incomplete? Hello Marcelo, The 'W' was intended to mean what Josip said. Also, sometimes you will see a job terminate "Backup OK -- with warnings", and this is when one would expect the jobstatus in the catalog to be 'W', but it's not. These jobs will also have a 'T' (Terminated OK) in the catalog. However, if you check the "Non-fatal FD errors", or "Non-fatal SD errors" in the job's summary, you will see that one, or both are non-zero for them. The queries that Josip sent as well as all of them in the code looking for "OK" job statues contain ('T', 'W') because it was intended that the "Backup OK -- with warnings" jobs might one day be set to 'W' instead of 'T'. I have had several conversations about this with the developers, but unfortunately, this is not going to ever happen. These queries are OK with both letters because they are used in SQL "IN" clauses which is an "any of these characters" choice. So, even though 'W' will never be there, the 'T' will, so the queries are OK - albeit confusing since 'W' does not appear anywhere else. :) In the baculabackupreport.py script I mentioned to you earlier, I am able to flag these 'with warnings' jobs because I check for OK jobs having a jobstatus of 'T', but also take into account the number of non-fatal FD and SD errors. P.S. There are several other characters in the 'status' table that are never used either. :) Hope this helps! Bill -- Bill Arlofski w...@protonmail.com _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users