Turn on backups, then restore one on purpose
A bug that deletes rows, a migration that drops a column, a compromised key that wipes a table: all are recoverable with a backup you can actually restore, and unrecoverable without one.
This is a checklist item in Scanwright rather than a scan finding, because nothing outside your database can see whether backups are on. Tick it only after a real restore.
What to turn on
- Daily automatic backups, kept for at least 7 days (30 is better).
- Point-in-time recovery if the plan offers it: it lets you rewind to a minute before the mistake instead of to last night.
- A separate copy outside the provider for anything you could not rebuild (a weekly dump to object storage you control).
Why you must restore once
Backups fail quietly: the job stops, the key expires, the file is empty. Restoring into a scratch project takes twenty minutes and proves the whole chain. Do it before launch and after any change to the database setup.
Enable backups in the provider dashboard, then restore the latest one into a throwaway project and check a few rows. Write down the steps you took; next time you will be doing them under pressure.
- Supabase: Project Settings → Database → Backups. Enable daily backups; enable Point in Time Recovery on plans that offer it.
- Create a scratch project and restore the latest backup into it.
- Open a table you know and confirm recent rows are there.
- Delete the scratch project, record the date, and tick the item in your Scanwright launch checklist.
# A weekly copy you control (run from CI or a small server)
pg_dump "$DATABASE_URL" --no-owner --format=custom --file=backup-$(date +%F).dump
# ...then upload backup-*.dump to private object storage with a 90-day lifecycle rule
FAQ
Is the free Supabase plan backed up?
Free projects have no automated backups. Take your own dumps until you upgrade.
How often should I test a restore?
Before launch, and then quarterly or after any change to the database plan or region.