Skip to content

Documentation

Sections

Back up and restore

What to back up on a self-hosted install, the commands for Docker Compose, Kubernetes, and a Linux server, and how to check a restore.

Where
.env (Docker Compose) · values.yaml (Kubernetes) · /etc/eventier/eventier.env (Linux server)
Permission
Admin of the host, cluster, or server · access to the database
Updated
November 2026

Before you start

Three things make a backup, and they belong together: the PostgreSQL database, the attachment store, and the settings file that holds SECRET_ENCRYPTION_KEY.

A database restored without its SECRET_ENCRYPTION_KEY loses every stored credential (integrations, SSO, and the installed license), so keep a copy of the settings file wherever the database backups go.

Step by step

  1. 1

    Know where each part lives

    Find the three parts for your path before you schedule backups.

    • Database: the bundled PostgreSQL, or your own through DATABASE_URL
    • Attachments: a volume or folder by default, or your S3-compatible bucket with ATTACHMENT_STORAGE_DRIVER=s3
    • Settings: .env (Docker Compose), secrets.yaml (Kubernetes), or /etc/eventier/eventier.env (Linux server)
  2. 2

    Back up the database

    Dump the bundled PostgreSQL in PostgreSQL's custom format, on your normal schedule and before every upgrade. With your own PostgreSQL, use its snapshots or your own pg_dump.

    Docker Compose

    In the bundle folderbash
    docker compose exec -T postgres pg_dump -U eventier -d eventier -Fc > eventier-$(date +%Y%m%d%H%M).dump
    cp -p .env .env.backup

    Kubernetes

    Dump on demand, or let the chart run a nightly backup of the bundled PostgreSQL.

    • postgresql.backup.enabled: true adds a CronJob, off by default
    • postgresql.backup.schedule: 0 2 * * * by default
    • postgresql.backup.retentionDays: 14 by default; older dumps are deleted
    • postgresql.backup.size: the backup volume, 20Gi by default
    • Each run writes eventier-<UTC time>.dump to the eventier-postgresql-backups volume and checks it with pg_restore --list; copy the dumps off the cluster with your volume backup tooling
    Dump on demandbash
    kubectl exec statefulset/eventier-postgresql -- pg_dump -U eventier -d eventier -Fc > eventier-$(date +%Y%m%d%H%M).dump

    Linux server

    A PostgreSQL on the same server is shown; use your own tooling otherwise.

    On the serverbash
    sudo -u postgres pg_dump -Fc eventier > eventier-$(date +%Y%m%d%H%M).dump
    sudo cp -p /etc/eventier/eventier.env /etc/eventier/eventier.env.backup
  3. 3

    Back up attachments

    Copy the attachment store with your usual volume, file, or bucket backup tooling, on the same schedule as the database.

    • Docker Compose: the eventier-uploads volume
    • Kubernetes: the eventier-uploads volume
    • Linux server: /opt/eventier/uploads
    • S3-compatible storage: the bucket, with your provider's versioning or replication
  4. 4

    Restore the database

    Stop the app so nothing writes, replace the database with the dump, then start the app again. Put back the settings file from the same backup first if it changed.

    Docker Compose

    In the bundle folderbash
    docker compose stop app
    docker compose exec -T postgres dropdb -U eventier eventier
    docker compose exec -T postgres createdb -U eventier eventier
    docker compose exec -T postgres pg_restore -U eventier -d eventier --no-owner < eventier-<stamp>.dump
    docker compose up -d

    Kubernetes

    Scale the app and worker to zero, restore, then scale back to your replica counts (1 each by default).

    Bundled PostgreSQLbash
    kubectl scale deployment/eventier deployment/eventier-worker --replicas=0
    kubectl exec statefulset/eventier-postgresql -- dropdb -U eventier eventier
    kubectl exec statefulset/eventier-postgresql -- createdb -U eventier eventier
    kubectl exec -i statefulset/eventier-postgresql -- pg_restore -U eventier -d eventier --no-owner < eventier-<stamp>.dump
    kubectl scale deployment/eventier deployment/eventier-worker --replicas=1

    Linux server

    On the serverbash
    sudo systemctl stop eventier
    sudo -u postgres dropdb eventier
    sudo -u postgres createdb -O eventier eventier
    sudo -u postgres pg_restore -d eventier --no-owner --role=eventier < eventier-<stamp>.dump
    sudo systemctl start eventier
  5. 5

    Check the restore

    Confirm the app is ready, can read its stored credentials, and holds the data you expect.

    • /api/health/ready answers 200 once the database answers and its migrations match the release
    • With METRICS_TOKEN set, the secret_key check of /api/health passes; “SECRET_ENCRYPTION_KEY cannot decrypt …” means the settings file is not the one from this backup
    • Admin → Billing shows a valid license; DECRYPT_FAILED has the same cause
    • Open a recent request and download one of its attachments
    Health checksbash
    curl -fsS https://<your domain>/api/health/ready
    curl -sS -H "Authorization: Bearer $METRICS_TOKEN" https://<your domain>/api/health

What to back up

Database
Docker Compose: postgres-data volume (bundled)
Kubernetes: The bundled PostgreSQL's volume, or your database
Linux server: Your PostgreSQL 16
Attachments
Docker Compose: eventier-uploads volume, or your bucket
Kubernetes: eventier-uploads volume, or your bucket
Linux server: /opt/eventier/uploads, or your bucket
Settings and keys
Docker Compose: .env
Kubernetes: secrets.yaml and your values.yaml
Linux server: /etc/eventier/eventier.env

Good to know

  • Practice a restore on a staging install, so the first one is not during an outage.
  • Stream the audit logs to your security information and event management (SIEM) tool to keep a copy outside the install: Audit logs.