Runbook: Restoring PostgreSQL Database Backups
Procedure for restoring database backups.
Procedure Steps
1. Drop Existing Active Connections & Database
sql
DROP DATABASE metapilot;
CREATE DATABASE metapilot OWNER metapilot;
2. Restore Dump
bash
pg_restore -h localhost -U metapilot -d metapilot -v /backups/metapilot_20260724.dump
3. Verify Database Integrity
bash
cd services/api
python manage.py check