Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pg_dump_backups : dumps of a DB mask the dumps of DB with similar shorter names #335

Open
Krysztophe opened this issue Nov 29, 2022 · 0 comments

Comments

@Krysztophe
Copy link
Collaborator

The databases names are central_server and central_server_payloads.
Backups are both here:

postgresql-central_server-28-11-2022_16-00-01.sql.gz
postgresql-central_server_payloads-28-11-2022_16-37-53.sql.gz

check_pgactivity does not seem to see the central_server_payloads dumps (NaN eveywhere),
probably because it begins with the shorter name of the other DB.

./bin/check_pgactivity -s pg_dump_backup --dbservice main \
--warning newest=1d --critical newest=3d \
--path /mnt/backup/xxx/*sql.gz --pattern 'postgresql-(\w+)-\d+-\d+-\d+_\d+-\d+-\d+.sql.gz'  \
--dbexclude 'template[01]|postgres'

POSTGRES_PGDUMP_BACKUP CRITICAL: 'central_server_payloads_oldest'=NaNs, 'central_server_payloads_newest'=NaNs, 'central_server_payloads_size'=NaNB |
central_server_newest=78257s;86400;259200 central_server_oldest=78257s
central_server_size=10042383770B central_server_delta=0B
central_server_payloads_newest=NaNs central_server_payloads_oldest=NaNs
central_server_payloads_size=NaNB central_server_payloads_delta=NaNB

If I remove postgresql-central_server-28-11-2022_16-00-01.sql.gz ,
check_pgactivity can now see postgresql-central_server_payloads-28-11-2022_16-37-53.sql.gz:

POSTGRES_PGDUMP_BACKUP CRITICAL:  .......
 central_server_payloads_newest=55727s;86400;259200 central_server_payloads_oldest=55727s central_server_payloads_size=17577056471

BTW, may I suggest to add more information on the files when --debug is activated ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant