pgBackRest is a robust backup and restore solution built for PostgreSQL, capable of handling the largest databases and most demanding workloads. It uses parallel processing and efficient compression algorithms to significantly speed up operations. You can store backups locally, on remote servers via a secure protocol, or in cloud object stores.
It provides a comprehensive set of features to ensure data safety and fast recovery:
services:
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
pgbackrest:
image: woblerr/pgbackrest:latest
container_name: pgbackrest
# Keeps the container alive so you can execute pgbackrest commands via 'docker exec'
command: tail -f /dev/null
volumes:
- ./pgdata:/var/lib/postgresql/data
- ./config:/etc/pgbackrest
- ./backups:/var/lib/pgbackrest
depends_on:
- postgres
restart: unless-stopped
POSTGRES_USER=admin
POSTGRES_PASSWORD=your_super_secret_password
POSTGRES_DB=app_database
Auto-fetched 12 minutes ago
Auto-fetched 12 minutes ago