Skip to content

pgmoneta/pgmoneta

pgmoneta

License: BSD-3-Clause Latest release GitHub stars Discussions

pgmoneta logo

English | Spanish

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.

Table of Contents

Features

  • 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-cli or pgmoneta-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

Installation

Install from the PostgreSQL YUM repository

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.

Compile from source

Required dependencies

Optional dependencies (for building documentation)

Install dependencies on Fedora / RHEL

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-static

Release build

The 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 install

See RPM for how to build a RPM of pgmoneta.

Debug build

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 ..
make

Remember to set the log_level configuration option to debug5.

Documentation

PDFs of the documentation are available on our website and on the releases page.

Tested platforms

Overview

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.

Related projects

Contributing

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.

Community

License

BSD-3-Clause