Skip to content

Backup strategies for managed databases — beyond the default

Daily automated backups with point-in-time recovery are the floor, not the ceiling. Here is how we layer backups on managed MySQL, Postgres, and Redis for production.

Managed MySQL and Postgres on Cloud PaaS ship with daily automated backups and seven-day point-in-time recovery. That is the floor, not a strategy. It covers a single class of failure — recent data loss on a single instance — and leaves several other failure modes uncovered. A real backup strategy answers four questions about each scenario, not one. Here is what we layer on top of the default for production workloads.

What’s happening

The default backup is a managed-platform snapshot stored on the platform’s infrastructure. If you accidentally drop a table on Tuesday and notice on Tuesday afternoon, PITR restores you to before the drop. Good. But the default does not protect against: a regional platform outage that locks you out of your own backups; a slow data-corruption bug that ran for two weeks before anyone noticed; or a developer running DELETE FROM on production at 11pm with no transaction. Those need additional layers.

How to verify

Check what your current strategy actually delivers. For Postgres on managed PaaS, the platform typically exposes:

# List recent backups available for restore
sh-paas db backups list --service postgres-prod
# Confirm PITR window
sh-paas db pitr describe --service postgres-prod

For MySQL, the binlog retention is what determines your PITR window:

SHOW BINARY LOGS;
SELECT @@binlog_expire_logs_seconds / 86400 AS days_retained;

If days_retained is 7 and your “find a bug from three weeks ago” scenario needs more, the default is not enough.

The fix

Layer three backups, each answering a different question.

Layer 1 — Platform PITR (the default). Covers the common case: yesterday’s mistake. Keep it on, verify the window covers your largest “noticed it later” gap, and confirm the platform’s restore process is documented in the runbook with a recent successful test restore on the books.

Layer 2 — Off-platform logical dumps. A nightly pg_dump / mysqldump written to object storage in a different region. Slower to restore, but it survives a platform-wide incident and gives you a portable artifact. Encrypt with a key the platform does not hold. Test the restore monthly on a throwaway instance — an untested backup is not a backup.

Layer 3 — Long-retention monthly snapshots. A monthly snapshot kept for twelve months in cheap cold storage. This is the layer that catches the corruption bug introduced three releases ago. The bug becomes a query — diff the affected rows between current production and the snapshot from the month it started — instead of a panic.

For Redis specifically, the default RDB snapshot every few hours is fine for cache workloads; for queue or session workloads, enable AOF with appendfsync everysec and verify the AOF file is included in the backup. A Redis “backup” without AOF on a stateful workload is a one-hour data loss window waiting to happen.

The boring outcome is that when a real incident lands, the question stops being “do we have a backup” and starts being “which layer answers this incident, and how long until we restore.”

If your managed database is on the default backup plan and your workload deserves more, our Cloud PaaS team layers and tests backups as part of the operating model — start a conversation.