Ops: set up automatic PostgreSQL backups

Open
#299 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker, docker-compose, postgresql

Research direction

Start by reading the POSTGRES_* settings and the external pg_net network in deployment/portainer/docker-compose.portainer.yaml, then the postgres service in docker-compose.yaml. The approach (pg_dump, pgBackRest, snapshots) is still open, so agree it with the maintainer before writing anything. Done means a scheduled, off-site, encrypted backup with a documented and tested restore, plus an alert on failure.

Written by the indexing model from the issue text.

Description

enhancement

Goal

Establish automated, restorable backups for the production Meshflow PostgreSQL database (Django/Celery/Channels data).

Context

  • Production stack: Portainer compose — deployment/portainer/docker-compose.portainer.yaml (API/workers use POSTGRES_* env; DB likely on external pg_net network).
  • Local/dev: postgres service in root docker-compose.yaml (postgres:17-alpine for dev — production version may differ).
  • No automated backup process is documented or wired in-repo today.

Scope

  • Choose approach: scheduled pg_dump (custom format + compression), pgBackRest, cloud provider snapshots, or host/volume backup — document rationale
  • Schedule (e.g. nightly full + optional WAL/archiving if RPO/RTO require it)
  • Off-site / off-volume destination (S3-compatible, second host, etc.) — backups on same disk as data are not sufficient
  • Retention policy (e.g. 7 daily, 4 weekly)
  • Encryption at rest for backup files (if stored outside trust boundary)
  • Runbook: restore procedure + tested restore drill on staging (or disposable clone)
  • Monitoring/alerting on backup job failure
  • Document in docs/ or deployment/ (env vars, cron/compose sidecar, credentials handling — no secrets in git)

Out of scope

  • Neo4j backup (separate ticket if needed)
  • Redis persistence strategy (separate concern)

Acceptance

  • Automated backups run on schedule without manual intervention
  • Operator can restore DB to a point in time within agreed RPO using documented steps
  • Failed backup run generates an alert or visible log/metric
Dominant language
Python
Stars
1
Forks
0
Avg merge
1d 20h
Merged PRs (30d)
5

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pskillen/meshflow-api

All issues in pskillen/meshflow-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.