Flask ops panel for PostgreSQL logical backups: scheduled pg_dump, optional S3 mirror, and weekly restore replay into an isolated container to prove dumps are restorable.
Replaces a manual SSH workflow with cron-driven automation, structured logs, and a browser UI. Built for a production document-collaboration stack (Postgres 15, Docker, Caddy, systemd).
Production (Apr–Jun 2026): 91 successful backups, 0 failures, ~68 days unattended. Restore verification 20/22 pass (both failures were container startup timeouts, not bad dumps).
- Daily backups with 7-day retention and per-run metadata (size, duration, disk free)
- On-demand backup and download from the panel
- Restore verification: replay latest dump in
postgres:15, validate table/row counts - S3 upload after local success (best-effort; never blocks the backup)
- SES alerts on failure (optional, feature-flagged)
- Session auth for operators; API key for cron and automation
Python 3.10 · Flask 3 · PostgreSQL 15 · Docker · Caddy · systemd · cron · boto3 (S3/SES) · Ubuntu 22.04
git clone https://github.com/hiteshnarayan/Backup-Control-Panel.git
cd Backup-Control-Panel
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python scripts/set_password.py # paste output into .env
python main.pyOpen http://127.0.0.1:5050/backup. Docker is required only for backup/restore scripts, not for the panel itself.
| Doc | Contents |
|---|---|
| docs/ARCHITECTURE.md | Components, data flow, auth, API, design rationale |
| docs/DEPLOYMENT.md | systemd, Caddy, cron, UFW, S3/SES setup |
app/routes/ auth, backup_api, dashboard
app/utils/ log_parser (pure functions, no Flask)
scripts/ backup, restore_verify, s3_upload, send_alert
docs/ architecture and deployment notes
MIT — see LICENSE.