Skip to content

Nightly pg_dump backup workflow + restore runbook #119

Description

@Miracle656

Background

Lens's aggregated price history lives in one managed Postgres. Losing it (provider limits, expiry, misconfig) means re-deriving from chain — slow. A nightly logical backup is the durability fallback for the mainnet deployment.

What to build

A free scheduled GitHub Actions workflow that pg_dumps to a dated artifact/release, plus a restore runbook. Covers both network DBs.

Key files

  • .github/workflows/db-backup.yml — new
  • docs/backup-restore.md — new

Suggested execution

git checkout -b ci/nightly-pg-dump
  1. Scheduled workflow using a DATABASE_URL secret
  2. pg_dump --format=custom → gzip → upload (retention ~14 days)
  3. Runbook: pg_restore into a fresh Neon instance, swap DATABASE_URL
  4. Handle separate testnet/mainnet DBs

Acceptance criteria

  • Nightly job produces a downloadable dump
  • Connection via secret (no creds committed)
  • Restore verified once end-to-end
  • Both network DBs covered

Drips Wave · Complexity: Easy · 100 points


Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programarea:ciCI/CD and toolingdifficulty:easy~1-3 hourshelp wantedExtra attention is neededpoints:100Easy tier — 100 Wave points

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions