I'm looking at CloudNativePG backup monitoring. Is ContinuousArchiving=True enough to tell whether a cluster is actually protected, or are there other checks needed?
Can CloudNativePG say archiving is healthy when backups aren't configured?
Answers
No. A cluster with no backup destination configured can still report ContinuousArchiving=True and say archiving is working. The archive command can return success when there's nowhere to send the WAL.
Check the backup configuration separately rather than alerting on that condition alone. The CloudNativePG status command can also show Continuous Backup not configured.
Reply to this answer
WAL archiving isn't a base backup. Even with archiving configured, you need a completed base backup before you have a starting point for recovery. Check for a successful backup as well as the archive status.
If you're using ScheduledBackup, immediate: true starts the first backup when the schedule is created instead of waiting for the cron schedule.
Reply to this answer
Put a restore test on the checklist too. Configuration and success indicators are useful, but they don't prove you can recover the database.
One recovery snag is reusing a serverName when an empty archive is expected. That can leave the cluster stuck setting up the primary, with an Expected empty archive message in the pod logs.
Reply to this answer
Backup status isn't the only operational surprise worth watching. An unsupervised rolling update can restart the primary instead of failing over to a replica, so writes may be unavailable while the primary pod comes back. Plan updates with that behavior in mind.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions