Backups to bacula for long term storage work nicely- however, because postgress dumps look like this:
/srv/postgres-backup/psql-all-dbs-2022-08-23-21-37.sql.gz
There is little space savings for doing incremental backups (bacula only handles incremental changes at file level), while limiting the retention of those backups (currently, with present hardware limitations, there is a 2 month retention for backups, which means the first backup on log is from the 5th of June):
check_bacula.py netboxdb1002.eqiad.wmnet-Monthly-1st-Wed-production-netbox-postgres id: 465248, ts: 2022-06-05 11:27:19, type: I, status: T, bytes: 7082896
However, because it is an incremental, and requires a full backup to be recovered, the first usable backup is from 6 of July:
id: 457448, ts: 2022-07-06 02:18:18, type: F, status: T, bytes: 135995152
Ideally, and to simplify many issues, dump-like backups use daily or weekly full backups only, something possible for a 40M backup, but may require a few changes to the script so we backup only the latest backup each time.
Also make sure we are unable to backup partial or ongoing backups, so dumping and bacula don't run at the same time.