Venolio

Backups and restore

Self-hosting

Venolio keeps everything your team makes in two places: the PostgreSQL database and the uploaded files. A backup is a copy of both, taken together, plus the configuration that unlocks them.

What to back up

What Where Why
The database The postgres_data volume Pages, databases, records, comments, accounts, settings and encrypted secrets.
Uploaded files The uploads volume Attachments, images, drive files and recordings.
.env The installation folder Above all APP_ENCRYPTION_KEY: without the original key, a restored server cannot read saved passwords, integration tokens, client secrets, the e-mail password or product vault entries. It also keeps the licence activation.
venolio.licence The installation folder The licence file, if you use one.
compose.yml and any compose.override.yml The installation folder To start the same installation again.

You do not need the Caddy volumes: certificates are issued again.

Keep .env apart from the data backups, in encrypted storage: anyone with both the database and the key can read every stored secret.

Take a backup

Stop the app for a moment so the database and the files match, dump the database, archive the files and start the app again. Run the commands in the installation folder:

cd /opt/venolio
target=/var/backups/venolio/$(date -u +%Y%m%dT%H%M%SZ)
mkdir -p "$target"
docker compose stop app
docker compose exec -T db sh -c 'pg_dump --format=custom --no-owner --no-acl -U "$POSTGRES_USER" "$POSTGRES_DB"' > "$target/database.dump"
docker compose run --rm --no-deps -T --entrypoint tar app -C /var/lib/venolio/uploads -czf - . > "$target/uploads.tar.gz"
docker compose start app
(cd "$target" && sha256sum database.dump uploads.tar.gz > SHA256SUMS)

The web app is unavailable while this runs; the database keeps running. If a command fails, start the app again with docker compose start app and look at the error before trying again.

Copy every backup off the server: to another machine, another disk or storage your team already uses, encrypted.

Schedule it

Save the commands as a script, for example /opt/venolio/backup-venolio.sh, that stops on the first error and always starts the app again:

#!/usr/bin/env bash
set -euo pipefail
umask 077
cd /opt/venolio
target=/var/backups/venolio/$(date -u +%Y%m%dT%H%M%SZ)
mkdir -p "$target"
trap 'docker compose start app >/dev/null' EXIT
docker compose stop app
docker compose exec -T db sh -c 'pg_dump --format=custom --no-owner --no-acl -U "$POSTGRES_USER" "$POSTGRES_DB"' > "$target/database.dump"
docker compose run --rm --no-deps -T --entrypoint tar app -C /var/lib/venolio/uploads -czf - . > "$target/uploads.tar.gz"
(cd "$target" && sha256sum database.dump uploads.tar.gz > SHA256SUMS)
echo "Backup written to $target"

and run it from cron at a quiet time, for example every night at 03:15:

15 3 * * * /opt/venolio/backup-venolio.sh >> /var/log/venolio-backup.log 2>&1

For a small team: one backup a day, the last few days and some weekly ones as space allows. Delete old backups automatically only after you have seen a copy from your off-server storage restore.

Restore

A restore replaces the database and every file of the target installation. Try it on a spare machine or a separate installation first, so you know it works before you need it.

You need:

  • the same Venolio release the backup was taken with (or install that release first);
  • the installation’s .env with the original APP_ENCRYPTION_KEY, and venolio.licence;
  • the backup folder, checked with sha256sum --check SHA256SUMS.

Then, in the installation folder:

  1. Start only the database and wait until it answers:

    docker compose up -d --wait db
    docker compose stop app
    
  2. Replace the database:

    docker compose exec -T db sh -c 'pg_restore --exit-on-error --clean --if-exists --no-owner --no-privileges -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < /var/backups/venolio/20261125T031500Z/database.dump
    
  3. Replace the files:

    docker compose run --rm --no-deps -T --entrypoint sh app -c 'find /var/lib/venolio/uploads -mindepth 1 -delete && tar -C /var/lib/venolio/uploads -xzf -' < /var/backups/venolio/20261125T031500Z/uploads.tar.gz
    
  4. Start everything:

    docker compose up -d --wait
    
  5. Check: the health address answers (see Monitoring and health), you can sign in, open a page saved before the backup and download an attachment. Open the mail account settings without sending anything, to see that saved credentials still work.

If a step fails, do not let people use the installation: fix the cause and restore again from a good backup. A half-restored server mixes old and new data.

A new server. Copy the installation folder (with .env and venolio.licence), install the same release, keep the same COMPOSE_PROJECT_NAME, and restore as above. With the original encryption key the server keeps its installation code, so the licence activation still works.

Secrets fail after a restore. If saved mail, calendar or integration credentials or secret server settings no longer work, the server was started with a different APP_ENCRYPTION_KEY. Put the original key back in .env and run docker compose up -d.

Other copies

  • People can export page trees, and everything they own as a workspace archive, in Settings → Import and export. These exports do not replace a server backup: they do not contain other people’s private pages, accounts, settings or stored credentials.
  • Product vault entries are in the database backup, encrypted. Workspace archives never contain them.

About this part of Venolio: Your server, your data, your rules

Checked against the app on . The same help is built into the Venolio apps and works offline. Something wrong or missing? Tell us.