Repository navigation
Data and Backups
Everything torq stores lives in one directory, /data in the container (TORQ_DATA_DIR):
/data/torq.db (+ -wal, -shm) SQLite database (WAL mode)
/data/attachments/ uploaded photos, manuals and invoices
/data/backups/ automatic copies taken before each schema upgrade (newest 3 kept)
Warning
A copy of /data taken while torq is writing can contain an incomplete database. Stop the container first, or let SQLite make the copy.
Consistent backup while torq keeps running. The torq image is distroless and has no sqlite3, so a throwaway Alpine container that mounts the same volume makes the copy:
docker run --rm -v torq-data:/data alpine sh -c \
'apk add --no-cache sqlite >/dev/null && sqlite3 /data/torq.db ".backup /data/backups/manual-$(date +%F).db"'Copy the whole volume (with torq stopped) to a tar file:
docker stop torq
docker run --rm -v torq-data:/data:ro -v "$PWD":/backup alpine tar czf /backup/torq-$(date +%F).tgz -C /data .
docker start torqOn a VPS, disk snapshots from your provider (e.g. Hetzner Backups) are a simple extra layer: SQLite in WAL mode recovers cleanly from them.
Each vehicle's History can be printed or exported as JSON or CSV, for archiving or when selling a car.
Pull the new image and recreate the container. Schema migrations run automatically at startup and only move forward. Before each migration torq copies the database to /data/backups/.
Images are tagged by commit (ghcr.io/marekbeckmann/torq:sha-<commit>). To go back, run the earlier image. If the older version refuses the newer database, restore the copy from /data/backups/ that was taken before the upgrade.
Getting started
Features
Operations