Skip to content
v0.5.1GitHub

Using

Streams the archive with HTTP Range support for resumable downloads.

applies to v0.5.1
GET
/store-api/backups/{id}/download
curl --request GET \
--url https://example.com/store-api/backups/example/download \
--header 'Authorization: Bearer <token>'

The archive is NDJSON. Its first line is the manifest, format version 2: format_version, id, created_at, luradb_version, scope, include_auth, encoding, schedule, and

  • shards: data shards of the server that wrote it. Informational only: a restore places every domain by the shard count of the server it runs on, so an archive restores into any shard count.
  • lsn_cut: {kv, json, rel}, per engine a write-ahead-log position that every write in the archive is at or below (a lower bound of the cut); 0 for an engine outside the scope. Positions keep growing across restarts, so they compare across runs of the server.
  • kv_snapshot_ts, json_snapshot_ts, rel_snapshot_ts: per engine, the newest read-snapshot stamp among the data shards; 0 for an engine outside the scope.

All shards of one engine are read at one consistent cut: an archive that holds a write holds every write confirmed before it. The relational cut is taken before the KV and JSON cuts. Domain lines carry their domain’s name; sections follow in the order KV, JSON, relational, auth; the last line is the checksum.

A relational domain is a rel-domain line (name, created_at), then its tables by creation, its views, and per table its rows and AUTOINCREMENT state:

  • rel-table: domain, name, columns (each name, type as SQL type name, nullable, primary_key, autoincrement, unique, an optional default of {"kind": "null"}, {"kind": "current_timestamp"} or {"kind": "literal", "value": …}, an optional references naming the target table) and indexes (name, column, unique; every index under its stored name).
  • rel-view: domain, name, sql, the stored SELECT text.
  • rel-row: domain, table, row, every column by name, NULL as null, KVREF/JSONREF links as stored.
  • rel-seq: domain, table, hw: the next insert without a key gets hw + 1.

Values are JSON numbers (INTEGER, REAL), booleans, strings (TEXT, KVREF, JSONREF) and, for TIMESTAMP, integer milliseconds since the Unix epoch. Archives of format version 1, which lack shards and lsn_cut, and archives without relational lines remain restorable.

id
required
string

Backup id

Full NDJSON archive

Media typeapplication/x-ndjson

Partial content (Range request)

Media typeapplication/x-ndjson

Invalid backup id

Media typetext/plain
string

Backup not found

Media typetext/plain
string

The backup job for this id is still running

Media typetext/plain
string

Backup is disabled

Media typetext/plain
string