Postgres Logical Backup Failed

PostgresLogicalBackupFailed #

Meaning #

The cronjob that triggers a logical backup of the PostgreSQL cluster has failed multiple times in a row. It’s a regular logical backup and the last successful run was more than 72 hours ago.

Impact #

With the absence of logical backups, the postgres cluster relies on basebackups and WAL streaming. While this is functional, it can result in broken states that are carried on by the base backup.

Diagnosis #

Check the CronJob:

kubectl get cronjobs --selector application=spilo

If no jobs are around anymore with logs to check, trigger a new one and check the logs:

kubectl create job --from="cronjob/<cronjob from above>" manual

Mitigation #

Temporarily you might be able to take manual backups using pg_dumpall.