# oddk vs Docker Compose, Pigsty and backup tools

> Where oddk fits next to Postgres in Docker Compose with a cron job, backup tools (Databasus, pgBackWeb, pgBackRest, WAL-G, Barman) and cluster managers (Pigsty, Autobase), what each does better, and how to use a backup tool with oddk.

Source: https://oddk.dev/docs/compare/
Project: https://github.com/AndrianBdn/oddk


Backup tools and oddk solve different problems. **Databasus, pgBackWeb,
pgBackRest, WAL-G and Barman back up databases you already run. oddk runs them**: it creates Postgres
instances on one Linux host, sizes and tunes them, manages their users and
upgrades, watches their health, and captures the whole deployment in one archive.

The facts about other tools below are from their own documentation and source,
linked in each section: as of October 2026 for Databasus, pgBackRest, WAL-G and
Barman, and November 2026 for pgBackWeb, Pigsty and Autobase. Check there before
relying on a detail.

## Which do you need?

- **You run Postgres in Docker Compose, with a cron job for backups.** oddk
  replaces both; see [Docker Compose and a cron job](#docker-compose-and-a-cron-job).
- **Your Postgres already exists, on a server or a managed service such as RDS
  or Cloud SQL.** A backup tool. oddk runs only the instances it created.
- **You need point-in-time recovery.** A backup tool that archives or streams
  WAL. oddk has none: you can restore to the last snapshot, and snapshots run at
  most once an hour.
- **You need failover or replicas.** A cluster manager such as
  [Pigsty](https://github.com/pgsty/pigsty) or
  [Autobase](https://github.com/autobase-tech/autobase), both built on Patroni;
  see [Pigsty and Autobase](#pigsty-and-autobase). oddk runs standalone
  instances on one host.
- **You back up MySQL, MariaDB or MongoDB as well.** Databasus, or WAL-G for
  MySQL and MariaDB. oddk runs only PostgreSQL.
- **You want to create and run Postgres on a Linux host you own or rent, and
  rebuild that host from one archive and one key.** oddk.

## Backup tools, side by side

{{% compare-table kind="backup" %}}
| | oddk | [Databasus](https://github.com/databasus/databasus) | [pgBackRest](https://pgbackrest.org/), [WAL-G](https://github.com/wal-g/wal-g), [Barman](https://github.com/EnterpriseDB/barman) |
|---|---|---|---|
| What it does | Runs Postgres instances on one host | Backs up existing databases | Back up and restore an existing Postgres server |
| Creates, sizes and tunes instances | Yes | No | No |
| Database users, major upgrades | Yes | No [^1] | No |
| Logical backups (`pg_dump`) | Yes, with `--logical` | Yes | No |
| Physical backups | Yes, the default | PostgreSQL 17+ | Yes |
| Incremental backups | No; every snapshot is complete | PostgreSQL 17+ | Yes |
| Point-in-time recovery | No | PostgreSQL 17+ | Yes |
| Encrypted archives | Always: age, post-quantum hybrid [^2] | AES-256-GCM | Optional [^3] |
| Offsite storage | S3 and S3-compatible | S3, R2, Google Drive, Azure Blob, NAS, FTP, SFTP, rclone | S3, Azure, Google Cloud Storage and others [^4] |
| Rebuild a lost host | Yes: one archive and the master key restore every instance and oddk's configuration | Restores databases; the server is yours to rebuild | Restores the cluster; the server and its Postgres installation are yours to rebuild |
| Other databases | No | MySQL, MariaDB, MongoDB (logical) | WAL-G: MySQL, MariaDB, SQL Server |
| Interface | CLI, plus an API on the host's loopback | Web UI with workspaces, roles and an audit log | CLI |
| Licence | MIT | Apache 2.0 | MIT, Apache 2.0, GPL 3 |
{{% /compare-table %}}

[^1]: Databasus can create a read-only database user for its own backups.
[^2]: ML-KEM-768 + X25519, with the key derived from oddk's master key. There
    is no setting to turn it off and no second key to manage. Without the master
    key, no archive can be restored or read; see
    [Encrypted at rest](../snapshots/#encrypted-at-rest).
[^3]: pgBackRest: AES-256-CBC. WAL-G: libsodium, OpenPGP or Yandex Cloud KMS.
    Barman: GPG. Off by default in all three.
[^4]: pgBackRest: S3, Azure, Google Cloud Storage, SFTP, POSIX and CIFS
    paths. WAL-G: S3, Google Cloud Storage, Azure, Swift, Alibaba Cloud, SSH.
    Barman: its own server's disk, or S3, Azure and Google Cloud Storage
    through `barman-cloud`.

## Where each one is stronger

**Databasus** restores each backup into a temporary database container and checks
the result, after every backup or on a schedule. oddk reads every archive back in
full when it is written and again before a restore, and checks catalogued
archives against their recorded SHA-256, but does not restore them to prove it.
Databasus also has a web UI for a team, backs up databases
on managed services and behind SSH tunnels, and covers MySQL, MariaDB and MongoDB.

**[pgBackWeb](https://github.com/eduardolat/pgbackweb)** (AGPL 3.0, being renamed
UFO Backup) is in the same class as Databasus: a web UI that schedules `pg_dump`
of existing databases, PostgreSQL 13 to 18, to local disk or S3, with health checks
and webhooks, and restores from the same UI. It encrypts the connection strings
and storage credentials it keeps; the dumps themselves are zipped SQL.

**pgBackRest, WAL-G and Barman** archive WAL continuously, so you can restore to a
moment rather than to the last backup. They take incremental backups and work
with an existing Postgres installation, however it was set up.
They need the server's `archive_command`, a replication connection or access to its
data directory, so they are set up on or next to the database server.

**oddk** does the part those tools assume is already done: it creates and runs the
instances. A snapshot captures every instance's data together with oddk's own
configuration in one encrypted archive, so a host that is gone comes back with
[one command](../snapshots/#rebuild-a-whole-host) and its master key, with its
instances, ports, parameter groups and passwords, and its schedules paused until
you resume them. It restores one instance, or one database as a new database,
while everything else keeps serving. It checks
instance and host health and sends a message when an instance degrades or a
scheduled run fails. It is one binary that needs only Docker and systemd.

## Docker Compose and a cron job

The most common way to self-host Postgres is a `postgres` service in a Compose
file and a cron job that runs `pg_dump`. It works until a part you wrote yourself
fails quietly. Each row below is something that setup leaves to you.

{{% compare-table kind="diy" %}}
| | oddk | Compose + cron |
|---|---|---|
| Create an instance | `oddk create` picks the data mount for the Postgres major, sets CPU and RAM limits and shared memory, and applies a parameter group calculated from them ([Tuning](../tuning/)) | You write the service, volume and settings. PostgreSQL 18's official image moved its data directory: a volume at the old path `/var/lib/postgresql/data` stops the container from starting |
| Postgres password | Never in the container's Docker configuration; oddk sets it over SQL | `POSTGRES_PASSWORD` in the Compose file, and readable with `docker inspect` |
| What a backup holds | Every instance, physical by default, plus oddk's own configuration, in one archive | What the script dumps, usually one `pg_dump` per database |
| Encryption | Always | Whatever the script adds |
| Is the backup good? | Every archive is read back in full before it counts, and its SHA-256 is recorded | What the script checks. `pg_dump \| gzip > file` reports gzip's exit status, not `pg_dump`'s, unless the script sets `pipefail` |
| Retention | The newest two archives are never pruned, and a local archive with no offsite copy is kept | Typically `find -mtime +N -delete`, which removes the last good dump as readily as any other once new ones stop arriving |
| A failure tells you | A failed run or an unhealthy instance sends a message to Slack, email, Telegram or a webhook | cron mails a job's output to a local user, if the host can send mail. A Compose healthcheck marks a container unhealthy and tells no one |
| Major upgrade | `oddk instance major-upgrade`: dump, fresh cluster, restore, with a full backup kept as the rollback | By hand: dump, new image, new volume, restore |
| Rebuild a lost host | One archive and the master key restore every instance, port, password and schedule | Reinstall, recreate the Compose project, restore each dump |
{{% /compare-table %}}

**Compose is stronger** when Postgres belongs to one application. The database
sits in the same file as the app, versioned with it in git, on the same network,
and nothing else runs on the host. oddk is a separate daemon with its own CLI,
and an application reaches its instances over the host-local bridge `10.88.0.1`.

## Pigsty and Autobase

[Pigsty](https://github.com/pgsty/pigsty) and
[Autobase](https://github.com/autobase-tech/autobase) build highly available
PostgreSQL clusters across several servers, with Patroni for failover. oddk runs
standalone instances on one host. If you need a standby that takes over by
itself, read replicas or point-in-time recovery, use one of them: they are
built for it and oddk is not.

{{% compare-table kind="cluster" %}}
| | oddk | Pigsty | Autobase |
|---|---|---|---|
| What it runs | Standalone instances on one host | Clusters on one node or many, with monitoring, pooling and load balancing | Highly available clusters on your servers or a cloud provider |
| Failover and replicas | No | Yes, with Patroni | Yes, with Patroni |
| Point-in-time recovery | No | Yes, with pgBackRest | Yes, with pgBackRest or WAL-G |
| How Postgres runs | Official Docker images, or compatible ones such as `pgvector` and `postgis` | OS packages on bare Linux; Docker only for trying it out | OS packages, installed by Ansible |
| Setup | One binary, plus Docker and systemd | Ansible playbooks, run by an admin user with passwordless SSH and sudo | A web console, an Ansible collection, or GitOps |
| Day to day | CLI, plus an API on the host's loopback | A YAML inventory and playbooks; Grafana dashboards | The web console, or Ansible |
| Licence | MIT | Apache 2.0 | MIT; the web console is proprietary, with a free Starter plan |
{{% /compare-table %}}

**Pigsty** packages 626 extensions and alternative Postgres kernels, and monitors
Postgres, nodes and infrastructure with VictoriaMetrics and Grafana. **Autobase**
adds connection pooling with PgBouncer, a load balancer, and major upgrades
across a cluster.

**oddk** is for when one host is enough. It installs with one command, and its
whole state, every instance included, fits in one encrypted archive that
rebuilds the host on a new machine.

## Using a backup tool with oddk

A logical backup tool can back up an oddk instance like any other Postgres
server. It gives you a second, independent copy on its own schedule, with the
tool's own encryption, storage and restore tests.

Get the instance's connection string:

```bash
oddk instance get-postgres-password app --conn
# postgresql://postgres:…@10.88.0.1:5432/postgres
```

`10.88.0.1` is host-local. A tool on the same host connects to it directly, from
the host or from a container on Docker's default network. A tool on another
machine needs an SSH tunnel to the host; Databasus has one built in.

Choose the user carefully. A dump is complete only if its user can read every
object:

- `oddk instance add-db-user app --username backup --database app --readonly`
  grants read access to the `public` schema's current tables and sequences, and to
  tables created later. A new schema or a new sequence, such as one from a
  `serial` column, makes the next dump fail.
- PostgreSQL's `pg_read_all_data` role (PostgreSQL 14 and later) covers every
  schema and sequence, but not large objects or tables with row-level security.
- The `postgres` user can read everything.

Whatever the user, a restore test finds out that a dump is incomplete.

Physical backups and point-in-time recovery from outside do not work against an
oddk instance as installed. Its `pg_hba.conf` accepts replication connections only
from inside the container, and oddk does not set an `archive_command`.

## What oddk is not

- **Not highly available.** No failover, no streaming replicas, no quorum. It
  runs standalone instances.
- **Not multi-tenant.** It assumes a single trusted operator on a single host.
  Anyone with the API token has full control.
- **Not internet-facing.** The API binds to `127.0.0.1` and Postgres to a
  host-local Docker bridge. Reach them over an SSH tunnel.
- **Not a Postgres fork, driver or connection pooler.** It runs the official
  PostgreSQL images and compatible ones such as `pgvector` and `postgis`.
- **Not a Kubernetes operator.** It talks to Docker directly.

