You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: CNPG Kubectl Plugin fails to report Continuous Backup status #7658
Hi @danielluke! I'm Dosu and I’m helping the cloudnative-pg team.
Based on your description and the information available, there are currently no known issues or discussions in the CloudNativePG repository specifically about the CNPG Kubectl Plugin failing to report Continuous Backup status, even when WAL archiving is working.
A few points to consider:
The official documentation for the CNPG Kubectl Plugin does show example output where "Continuous Backup status" is reported as "Not configured," which matches what you are seeing. This suggests that the plugin may only report this status as "configured" when certain conditions are met in the cluster configuration or status fields, not just when WAL archiving is active. You can review this in the plugin documentation.
The troubleshooting guide recommends checking your cluster's status fields, specifically lastSuccessfulBackup and firstRecoverabilityPoint, to verify that backups are recognized as configured and working. If these fields are missing or not updated, the plugin may not detect continuous backup as configured, even if WALs are being archived. See the troubleshooting guide for more details.
The plugin supports a --verbose option, which can provide more detailed status information and may help clarify what the plugin is (or isn't) detecting about your backup configuration. Try running:
kubectl cnpg status <cluster-name> --verbose
and review the output for any clues about backup detection.
Your cluster spec shows the use of the barman-cloud.cloudnative-pg.io plugin with isWALArchiver: true, but does not include a .spec.backup stanza. According to the documentation, the absence of a .spec.backup section means that scheduled backups are not configured, which may be why the plugin reports "Continuous Backup status: Not configured" even though WAL archiving is working. The plugin may require both WAL archiving and scheduled backups to consider continuous backup as "configured" in its status output.
If you want the plugin to recognize continuous backup as configured, try adding a .spec.backup section to your cluster manifest and see if the status changes after applying the update and waiting for the operator to reconcile.
If you have already done this or if the issue persists, it may be a new bug or a limitation in how the plugin detects backup configuration. In that case, gathering the verbose output and your cluster status fields will be helpful for further investigation.
Conditions:
Last Transition Time: 2025-05-28T06:05:57Z
Message: Cluster is Ready
Reason: ClusterIsReady
Status: True
Type: Ready
Last Transition Time: 2025-05-28T06:04:51Z
Message: Continuous archiving is working
Reason: ContinuousArchivingSuccess
Status: True
Type: ContinuousArchiving
Last Transition Time: 2025-05-28T00:00:58Z
Message: Backup was successful
Reason: LastBackupSucceeded
Status: True
Type: LastBackupSucceeded
and
Last Failed Backup: 2025-03-25T14:53:02Z
Last Successful Backup: 2025-05-27T00:02:43Z
Last Successful Backup By Method:
Barman Object Store: 2025-05-27T00:02:43Z
nightly backups and WAL archiving look fine.
It's clear from code inspection that this just hasn't yet been updated for the plugin backup method:
Seeing the same thing about the metric cnpg_collector_last_available_backup_timestamp and cnpg_collector_first_recoverability_point
I've been experimenting with adding some kind of servicemonitor or podmonitor for the barman pod/service in the cnpg-system namespace but no luck so far.
Activity
dosubot commentedon May 27, 2025
Hi @danielluke! I'm Dosu and I’m helping the cloudnative-pg team.
Based on your description and the information available, there are currently no known issues or discussions in the CloudNativePG repository specifically about the CNPG Kubectl Plugin failing to report Continuous Backup status, even when WAL archiving is working.
A few points to consider:
lastSuccessfulBackupandfirstRecoverabilityPoint, to verify that backups are recognized as configured and working. If these fields are missing or not updated, the plugin may not detect continuous backup as configured, even if WALs are being archived. See the troubleshooting guide for more details.--verboseoption, which can provide more detailed status information and may help clarify what the plugin is (or isn't) detecting about your backup configuration. Try running:Your cluster spec shows the use of the
barman-cloud.cloudnative-pg.ioplugin withisWALArchiver: true, but does not include a.spec.backupstanza. According to the documentation, the absence of a.spec.backupsection means that scheduled backups are not configured, which may be why the plugin reports "Continuous Backup status: Not configured" even though WAL archiving is working. The plugin may require both WAL archiving and scheduled backups to consider continuous backup as "configured" in its status output.If you want the plugin to recognize continuous backup as configured, try adding a
.spec.backupsection to your cluster manifest and see if the status changes after applying the update and waiting for the operator to reconcile.If you have already done this or if the issue persists, it may be a new bug or a limitation in how the plugin detects backup configuration. In that case, gathering the verbose output and your cluster status fields will be helpful for further investigation.
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
danielluke commentedon May 28, 2025
From 'kubectl describe cluster`:
and
nightly backups and WAL archiving look fine.
It's clear from code inspection that this just hasn't yet been updated for the plugin backup method:
cloudnative-pg/internal/cmd/plugin/status/status.go
Line 517 in a9d81ac
rofafor commentedon Jun 2, 2025
As a hotfix you can circumvent the
nilcheck by adding empty backup definition into your manifest:ljhanson commentedon Jun 3, 2025
This works for me as well. But doesn't fix the Physical Backups or First Point of Recoverability output.
haraldkoch commentedon Jun 7, 2025
The matching prometheus metric
cnpg_collector_last_available_backup_timestampis also no longer updated after switching to the barman plugin.sbv-csis commentedon Jun 12, 2025
Seeing the same thing about the metric
cnpg_collector_last_available_backup_timestampandcnpg_collector_first_recoverability_pointI've been experimenting with adding some kind of servicemonitor or podmonitor for the barman pod/service in the cnpg-system namespace but no luck so far.