Skip to main content

Fields

FieldTypeRequiredDescription
autosavebooloptionalEnable autosave snapshots. Default: false
autosaveDebounceSecondsintoptionalMinimum seconds between autosaves. Default: 30
retentionobjectoptionalSnapshot retention policy
retention.maxSnapshotsintoptionalMaximum snapshots to retain. Default: 100
volumesvolume[]optionalVolume definitions with consistency policies

volumes[]

FieldTypeRequiredDescription
namestringrequiredVolume name, referenced by services
consistencyenumrequiredsqlite, postgres, or generic

Consistency values

ValueBehavior
sqliteWAL checkpoint (PRAGMA wal_checkpoint(TRUNCATE)) + fsync before snapshot
postgresLogical dump via pg_dump for portable, transaction-consistent snapshots
genericBest-effort copy — pause or stop the container, tar the directory, resume
Use the right consistency type for each database. Wrong consistency can produce corrupt snapshots.

Example

state:
  autosave: true
  autosaveDebounceSeconds: 30
  retention:
    maxSnapshots: 100
  volumes:
    - name: dbdata
      consistency: postgres
    - name: uploads
      consistency: generic
    - name: app-db
      consistency: sqlite

How autosave works

When autosave: true, the host app schedules a snapshot every autosaveDebounceSeconds seconds. Snapshots older than maxSnapshots are pruned automatically (oldest first). The current state is never deleted — only older snapshots are pruned.
Snapshots are content-addressed and deduplicated — unchanged data between snapshots is stored only once. Disk usage grows proportional to actual data changes, not linearly with snapshot count.