-
Notifications
You must be signed in to change notification settings - Fork 203
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
Not showing lock held or backup in progress from info command #2346
Comments
Hi, First of all, a little bit of background for the json output: #2343 (comment) What command are you running exactly and where? The running backup should only be seen on the repository host. A quick test (1 repo-host + 1 pg-host) showed me that the info output works as expected, reflecting what's inside the lock: $ pgbackrest info --stanza=ro9pg
stanza: ro9pg
status: ok (backup/expire running - 34.12% complete)
$ cat /tmp/pgbackrest/ro9pg-backup.lock
{"execId":"11623-8a6d5ca8","pctCplt":3412,"pid":11623,"sz":9439150710,"szCplt":3221225472} Since you have multiple stanzas defined, did you specify the $ pgbackrest info
stanza: ro9pg
status: ok (backup/expire running)
$ pgbackrest info --stanza=ro9pg
stanza: ro9pg
status: ok (backup/expire running)
$ pgbackrest info --output=json
"status":{"code":0,"lock":{"backup":{"held":true}},"message":"ok"}
$ pgbackrest info --stanza=ro9pg --output=json
"status":{"code":0,"lock":{"backup":{"held":true}},"message":"ok"} So it could be useful for you to specify that arg, display the content of the lock and of the info command at the same time for comparison. Monitoring the locks directly is a good idea anyway IMHO. A lock file staying there for too long might indicate a problem (backup too long or wrongly interrupted for example). Kind Regards |
Thanks for your response. Here are some commands and output:
These are all running from the repo host. The host running pgbackrest. Either way, my Thank you for looking! |
Here's some more output. After some time of running the backup, the lock file changes. The
|
Hi, Maybe adding
$ cat /tmp/pgbackrest/d11pg-backup.lock
{"execId":"11986-437f5fd4","pctCplt":1606,"pid":11986,"sz":967412859,"szCplt":155385856}
$ pgbackrest info --stanza=d11pg
status: ok (backup/expire running - 16.06% complete)
$ pgbackrest info --stanza=d11pg --output=json
"status":{"code":0,"lock":{"backup":{"held":true,"size":967412859,"size-cplt":155385856}},"message":"ok"} Sure, using the info command to get the list of the backups in the repositories is useful. But to be honest, I wouldn't use the info command to monitor the progress of the running commands anyway, the lock files are exactly there for that purpose. |
I appreciate your looking at this. Thank you. |
You can have a look at this PR if you want to see the details of the implementation. |
Please provide the following information when submitting an issue (feature requests or general comments can skip this):
pgBackRest version: 2.49
PostgreSQL version: 9.6
Operating system/version:
DB: Centos 7
Pgbackrest: Alma Linux 9
Did you install pgBackRest from source or from a package? Yes, both YUM packages
Please attach the following as applicable:
pgbackrest.conf
file(s)When a backup is currently running I am seeing a lock file in
/tmp/pgbackrest/<stanza>-backup.lock
. However when I runinfo
the status shows as ok, as if no backup is running. Theinfo
command with--output json
status block looks like:I am trying to set up monitoring for pgbackrest, shouldn't
info
show that a backup is in progress and it's status?Thank you
The text was updated successfully, but these errors were encountered: