djangoplay-web / Runbooks / Runbook — PostgreSQL
DocsDjangoPlay WebRunbooksRunbook — PostgreSQL

Runbook — PostgreSQL

Inspect active connections before maintenance.

1 min readApplies to v1.2.2
On this page ▾
  1. Health
  2. Connections
  3. Disk
  4. Backup Before Risky Changes
  5. Restore Principle

Health

bash
sudo systemctl status postgresql

Connections

Disk

bash
df -h

Backup Before Risky Changes

Always create a verified backup before:

  • destructive migrations
  • ownership changes
  • restore operations
  • major data repair
  • production imports

Restore Principle

Restore to a controlled target first when practical.

Verify:

  • database owner
  • schema owner
  • application role
  • privileges
  • extensions
  • migration state

before returning the database to application traffic.