A simple PostgreSQL backup tool supporting parallel dumps, database filtering, encryption, compression, checksums, and upload to S3/GCS/Azure/SFTP.
- v2.6.0
- Published at
- Jul 27, 2025
- 566
- Stars
- 14,922
- Download
- Synced at
- 15d ago
Latest release
v2.6.0Jul 27, 2025, 01:15 PMDownloads slow? Switch the source anytime above
README
Project Overview
pg_back is a dump tool for PostgreSQL that dumps all or some databases with globals at once in the format you want. Behind the scene, it uses pg_dumpall to dump roles and tablespaces, and pg_dump to dump each selected database to a separate file in the custom format.
Key Features
- Dump all or a list of databases, or exclude specific databases
- Include database templates
- Choose the dump format per database
- Limit dumped schemas and tables
- Dump databases concurrently
- Compute SHA checksum of each dump
- Pre-backup and post-backup hooks
- Purge based on age and number of dumps to keep
- Dump from a hot standby by pausing replication replay
- Encrypt and decrypt dumps
- Upload and download to S3, GCS, Azure, B2, or SFTP
Target Audience
- PostgreSQL database administrators
- DevOps engineers
- Teams who need automated backups
Quick Start
- Download a compiled binary from Releases
- Or install via Go:
go install github.com/orgrim/pg_back@latest - Connect to PostgreSQL using
-h,-p,-U, and-d - Specify output directory:
-b /var/backups/postgresql
Core Advantages
- Parallel dumps for speed
- Multiple storage backends (S3, GCS, Azure, B2, SFTP)
- Encryption and checksums for data integrity
- Open-source and free (MIT)
System Requirements
- OS: Cross-platform
- Architectures: x86_64, arm64
- Additional Dependencies: pg_dump and pg_dumpall (PostgreSQL client tools)
Release history
Sort