Home / Help / Reference

Backup & restore

Continuity runbook for digital operations data and configuration.

This runbook covers preserving continuity for NSVA’s digital systems: the PostgreSQL database and the object-storage bucket used for encrypted files (DD-214, uploaded documents) and archives.

What to back up

  1. Database
    • Back up your PostgreSQL data referenced by DATABASE_URL.
  2. Object storage
    • Back up the object storage bucket used by the live site (for NSVA on Google Cloud, typically Cloud Storage).
    • Include both:
      • Transient encrypted uploads (e.g. dd214/…)
      • Archive exports (e.g. archive/…)

Backup checklist (before a change / on a schedule)

  1. Confirm environment variables are current (DATABASE_URL, STORAGE_PROVIDER, and storage credentials).
  2. Create a database backup (platform automated backup or a point-in-time backup).
  3. Create an object-storage snapshot (or consistent bucket snapshot) at the same approximate time as the DB backup.
  4. Record:
    • Backup timestamps
    • Source environment
    • Where the backups are stored (bucket/key prefixes and DB backup identifier)

Restore checklist (tested procedure)

  1. Provision a target environment (recovery or new production instance).
  2. Restore the database to the backup timestamp.
  3. Restore the object storage to the backup state (so stored file keys referenced by the DB exist again).
  4. Ensure the app starts cleanly:
    • Set environment variables to match the restored target.
    • Apply database schema updates as required by your deployment runbook (for example the same migration step used for a normal release).
  5. Validate continuity:
    • GET /api/health returns success.
    • A sample read works end-to-end:
      • View an archived/a stored file record (admin DD-214 workflow) or
      • Download a PDF protected resource using its StoredFile key (where applicable).
  6. Run a quick permissions sanity check:
    • Log in as an admin member and confirm Admin → Audit Log and key workflow dashboards load.

Verification & audit evidence

After a restore test:

  1. Capture success/failure notes in your leadership ops record.
  2. Confirm that:
    • The DB contains the expected rows (orders, donations, memberships, audit logs).
    • The object storage contains expected keys referenced in DB.
  3. If restore diverges, restore again and document the corrective action.