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

Data Persistence

All mutable state lives under /data inside the container. The shipped docker-compose.yml mounts a Docker named volume there:

volumes:
  - taka_data:/data

What is stored

Path inside containerContents
/data/taka.dbSQLite database: scans, findings, API keys, scan defaults, custom AI prompts
/data/taka.db-shm, /data/taka.db-walSQLite write-ahead log and shared memory

Losing /data means losing your scan history and saved API keys. JSON and HTML reports are generated on demand from the database; they live inside taka.db, not as separate files on disk. The rule set itself is baked into the image.

Named volume (default)

With the default configuration, Docker manages the volume:

# Inspect the volume
docker volume inspect taka-docker_taka_data

# Find its location on disk (Linux)
docker volume inspect taka-docker_taka_data \
  --format '{{ .Mountpoint }}'

The volume survives docker compose down but is destroyed by docker compose down -v.

Bind mount (host directory)

If you prefer the data to live in a directory you can browse directly (for example to back it up with existing host tooling), replace the volumes: section in docker-compose.yml:

services:
  taka:
    # ...
    volumes:
      - ./data:/data

# Remove the top-level `volumes:` block when using a bind mount.

Create the directory before starting the container:

mkdir -p data
docker compose up -d

Important

The container process writes as its internal user. On some hosts you may need to chown the ./data directory so the container can write to it. If Taka fails to start with a permission denied on taka.db, check the ownership and mode of the host directory.

Backing up

Because the database is SQLite, the safest way to back up is to stop the container first:

docker compose stop
cp -r data data-backup-$(date +%F)
docker compose start

For hot backups (container running), use the SQLite .backup command inside the container:

docker compose exec taka sh -c \
  "sqlite3 /data/taka.db '.backup /data/taka.backup'"

Then copy /data/taka.backup out of the volume.

Migrating to a new host

  1. docker compose down on the old host.
  2. Copy the volume contents (either the bind-mount directory or the named volume’s Mountpoint) to the new host.
  3. Place the data under the same path (or reconfigure docker-compose.yml).
  4. docker compose up -d on the new host.

The database format is stable across patch releases. For major upgrades, review the release notes first. See Updating & Lifecycle.

Resetting

To wipe all scan history and start fresh:

docker compose down -v   # -v removes the named volume
docker compose up -d

With a bind mount, delete the host directory instead:

docker compose down
rm -rf ./data
docker compose up -d