🗄️ Databases & Storage

Postgres Backup to S3

Docker Compose: pg_dump cron container that dumps, compresses, encrypts with GPG, and ships backups to S3 on a configurable schedule with retention management.

Postgres Backup to S3

A lightweight Docker Compose service that adds automated, encrypted Postgres backups to any stack. A cron container runs pg_dump on your schedule, compresses with gzip, encrypts with GPG, and uploads to S3. A separate retention script prunes old backups automatically.

What's Included

  • pg_dump Cron Container — Debian-slim image with pg_dump, gzip, GPG, and the AWS CLI; runs on a cron schedule you set in .env
  • GPG Encryption — backups encrypted at rest with a public key you supply; only recoverable with your private key
  • S3 Upload — uploads via the AWS CLI with configurable bucket, prefix, and storage class
  • Retention Management — companion script that deletes S3 objects older than a configurable number of days
  • Restore Script — documented restore procedure: download from S3, decrypt, decompress, restore with psql

What You Get

  • docker-compose.yml — drop-in sidecar service; add it to your existing stack or run standalone
  • Dockerfile — backup container image definition
  • entrypoint.sh — backup script (dump → compress → encrypt → upload)
  • scripts/retention.sh — S3 retention management script
  • scripts/restore.sh — documented restore procedure
  • .env.example — all variables documented with sensible defaults
  • README.md — setup guide, restore walkthrough, and cron schedule examples

Requirements

Docker Engine, an existing Postgres instance (local container or remote), an S3 bucket, an IAM user with s3:PutObject and s3:DeleteObject permissions, and a GPG key pair for encryption.

$7.00
  • Instant download after purchase
  • Link valid for 48 hours
  • Up to 3 downloads per license
  • Secure, private delivery
Payments secured by Stripe