Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backups and restore

A complete backup has three parts. Missing any one of them makes the others much less useful.

PartContainsHow often
DatabaseWorkflows, versions, encrypted credentials, users, executions, queue, audit logContinuously or at least daily
Blob storeLarge execution payloads and binary files referenced by executionsWith the database
Encryption keyThe KEK that unwraps credential keysOnce, and after every rotation, stored separately

If you only need workflows and credentials (not execution history), a database backup and the key are enough: executions whose blobs are missing show their metadata but not their large payloads.

SQLite

Tappet runs SQLite in WAL mode. Do not copy the .db file while Tappet is running: the copy can be inconsistent. Use one of the following.

Online backup with the SQLite shell

sqlite3 /var/lib/tappet/tappet.db ".backup '/backups/tappet-$(date +%F).db'"

or, producing a compacted copy:

sqlite3 /var/lib/tappet/tappet.db "VACUUM INTO '/backups/tappet-$(date +%F).db'"

Both are safe while Tappet is running. Then back up the blob directory:

rsync -a --delete /var/lib/tappet/blobs/ /backups/blobs/

Blobs are content-addressed and immutable, so incremental copies are cheap. Copy the database first and the blobs second: every blob the database snapshot references then exists in the copy.

Continuous replication

For point-in-time recovery, stream the SQLite WAL to object storage with Litestream. Example litestream.yml:

dbs:
  - path: /var/lib/tappet/tappet.db
    replicas:
      - type: s3
        bucket: my-backups
        path: tappet/db
        region: eu-central-1

Restore

sudo systemctl stop tappet
cp /backups/tappet-2026-11-20.db /var/lib/tappet/tappet.db
rm -f /var/lib/tappet/tappet.db-wal /var/lib/tappet/tappet.db-shm
rsync -a /backups/blobs/ /var/lib/tappet/blobs/
sudo systemctl start tappet

Start Tappet with the same TAPPET_ENCRYPTION_KEY (and TAPPET_ENCRYPTION_KEY_VERSION) that was active when the backup was taken, or a later key if a rotation happened after it and the backup was re-wrapped; see Key rotation.

Postgres

Logical backups

pg_dump --format=custom --no-owner --file=/backups/tappet-$(date +%F).dump "$TAPPET_DATABASE_URL"

Restore into an empty database:

createdb tappet_restore
pg_restore --no-owner --dbname=tappet_restore /backups/tappet-2026-11-20.dump

Point-in-time recovery

For production HA, use your platform’s continuous archiving (managed Postgres snapshots and point-in-time recovery, or WAL archiving with a tool such as pgBackRest or WAL-G). Tappet needs nothing special: one database, standard tables, no extensions.

Blobs on S3

Enable bucket versioning, and a lifecycle rule that removes non-current versions after your recovery window. Tappet deletes blobs only through retention pruning, so versioning protects against accidental deletion.

Restore drill

Test restores regularly, on a separate machine:

  1. Restore the database and blobs.
  2. Start Tappet with the backed-up key on an isolated network: no outbound internet access, and not reachable by webhook senders. Restored workflows are still marked active, and on a connected host their schedules and polls would run real side effects.
  3. Open a few workflows and executions, and test a credential.

A backup that has never been restored is a hope, not a backup.

What not to rely on

  • File system snapshots of a running SQLite database without WAL-aware tooling.
  • Exporting workflows as JSON as your only backup: exports contain credential references, not credentials, and no execution history.