pgmoneta is a backup / restore solution for PostgreSQL. It supports full and incremental backups, point-in-time restore, WAL shipping, hot standby, compression, encryption, TLS, and a Prometheus interface for operations.
pgmoneta is named after the Roman Goddess of Memory.
Visit our website for documentation, tutorials and release downloads. Or checkout some demos here.
- Features
- Installation
- Documentation
- Tested platforms
- Overview
- Related projects
- Contributing
- Community
- License
- Full backup of a PostgreSQL cluster with tablespace support
- Incremental backup for PostgreSQL 14+ (tablespace support for PostgreSQL 17+), intuitive backup chain management
- Restore to any saved backup, with point-in-time recovery
- WAL streaming to save Write-Ahead Log (WAL) segments
- WAL tools to inspect Write-Ahead Log (WAL) records, and optionally filter them out
- Compression — gzip, zstd, lz4, bzip2
- AES encryption of backups at rest
- Symlink support for all files
- Hot standby — keep a warm copy of the cluster ready
- Prometheus metrics endpoint for monitoring
- Web console for inspecting metrics
- Remote management via
pgmoneta-cliorpgmoneta-mcp - Offline detection of unreachable instances
- Transport Layer Security (TLS) v1.2+ for client and server connections
- Daemon mode with systemd integration
- User vault for managing PostgreSQL credentials securely
- Worker pool to accelerate operations (backup/restore/delete/verify...)
- MCP server/client to interact with core using natural language
For RPM-based distributions (Fedora, RHEL, Rocky Linux, AlmaLinux), pgmoneta
is available as a pre-built package from the official PostgreSQL YUM
repository (PGDG).
Add the PGDG repository — pick and install the matching RPM from the PGDG repo packages page, for Fedora / RHEL / Rocky Linux / AlmaLinux 10, example to install the RPM:
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-10-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Then to install pgmoneta:
dnf install -y pgmoneta
pgmoneta does not rely on PostgreSQL binary. But if you need PostgreSQL to try the tool, disable the distribution-supplied PostgreSQL module and install the PostgreSQL version of your choice (example for PostgreSQL 18):
dnf -qy module disable postgresql
dnf install -y postgresql18 postgresql18-server
See the Getting Started guide for first-run configuration once the package is installed.
- clang (or gcc)
- cmake
- make
- libev
- OpenSSL
- zlib
- zstd
- lz4
- bzip2
- systemd
- libssh
- libarchive
- rst2man (man pages)
dnf install git gcc clang clang-analyzer clang-tools-extra cmake make \
libev libev-devel openssl openssl-devel \
systemd systemd-devel zlib zlib-devel \
libzstd libzstd-devel lz4 lz4-devel \
libssh libssh-devel python3-docutils libatomic \
bzip2 bzip2-devel libarchive libarchive-devel \
libasan libasan-staticThe following commands will install pgmoneta under /usr/local:
git clone https://github.com/pgmoneta/pgmoneta.git
cd pgmoneta
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make installSee RPM for how to
build a RPM of pgmoneta.
The following commands will create a DEBUG version of pgmoneta:
git clone https://github.com/pgmoneta/pgmoneta.git
cd pgmoneta
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug ..
makeRemember to set the log_level configuration option to debug5.
- User guide / EN
- User guide / ES
- Getting Started
- Configuration
- Web Console
- Architecture
- Developer guide
PDFs of the documentation are available on our website and on the releases page.
pgmoneta makes use of
- A process model
- A shared memory model across processes
- libev for fast network interactions
- Atomic operations to keep track of state
See Architecture
for the architecture of pgmoneta.
- pgmoneta_mcp — a
Model Context Protocol server for
pgmoneta, letting AI assistants interact with backups and restores.
Contributions to pgmoneta are managed on GitHub:
Contributions are most welcome!
Please consult our Code of Conduct for interacting in our community. New contributors may also want to read the Developer guide.
If you find pgmoneta useful, consider giving the project a
star on GitHub.
- Website: https://pgmoneta.github.io/
- X / Twitter: @pgmoneta