Skip to content

Backups

Conveyor stores all of its state (projects, servers, deploy steps, deployment history, and all encrypted secrets) in a single SQLite database under $CONVEYOR_DATA_DIR (/data by default in the Docker image).

Back up the database with .backup, not a file copy

Section titled “Back up the database with .backup, not a file copy”

Use SQLite’s own .backup command rather than copying conveyor.db directly:

Terminal window
sqlite3 /data/conveyor.db ".backup /path/to/backup.db"

This is WAL-safe and produces a consistent snapshot even while Conveyor is running. A plain file copy of conveyor.db while the process is live can capture an inconsistent state: Conveyor runs SQLite in WAL mode, so some committed data lives in the accompanying -wal file until it’s checkpointed, and the .db file alone may be incomplete.

In Docker Compose:

Terminal window
docker compose exec conveyor sqlite3 /data/conveyor.db ".backup /data/backup.db"
docker compose cp conveyor:/data/backup.db ./backup.db

A database backup without the matching encryption key won’t restore a working instance. You’d get back projects, servers, and deployment history, but every server would need its SSH key reconfigured and every .env re-entered from scratch.

  • The SQLite database (via .backup, as above).
  • CONVEYOR_ENCRYPTION_KEY, wherever you store secrets (password manager, secrets vault, etc.), not next to the database backup.
  • If using CONVEYOR_TLS_MODE=self-signed, the generated certificate under $CONVEYOR_DATA_DIR/tls is optional. Conveyor regenerates it on next boot if missing; backing it up just avoids a new browser warning after a restore.
  1. Stop Conveyor.
  2. Replace $CONVEYOR_DATA_DIR/conveyor.db (and its -wal/-shm files, if present) with the backed-up database.
  3. Set CONVEYOR_ENCRYPTION_KEY to the same key that was in use when the backup was taken, not a newly generated one.
  4. Start Conveyor.

If the key doesn’t match the one used to encrypt the backed-up database, every decrypt operation for SSH keys, GitHub tokens, and .env content will fail.