Using
Streams the request body to `backup.dir`, verifies its checksum and manifest, then assigns it a fresh server-side id (`bk_..._upload[_N]`) — the id in the manifest is never adopted. Invalid archives are discarded.
applies to v0.5.1const url = 'https://example.com/store-api/backups/upload';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/plain'}, body: 'example'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/store-api/backups/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: text/plain' \ --data exampleAuthorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”NDJSON backup archive, raw bytes streamed to disk (no multipart)
Responses
Section titled “Responses”Archive accepted
Manifest fields + state + size (GET /backups/{id} and
POST /backups/upload). Everything but id/state/scope is optional:
the currently-running-job shape (running) only fills started_at; the
complete/incomplete shape fills the rest instead.
object
The newest read-snapshot stamp of the JSON engine among the data shards.
The newest read-snapshot stamp of the KV engine among the data shards.
Per engine, a write-ahead-log position that every write in the archive is at or below; 0 for an engine outside the scope and for format version 1. Positions keep growing across restarts, so they compare across runs of the server.
object
The newest read-snapshot stamp of the relational engine among the data shards.
Data shards of the server that wrote the archive; 0 for format version 1. Informational: a restore places every domain by the shard count of the server it runs on.
Example generated
{ "created_at": 1, "encoding": "example", "format_version": 1, "id": "example", "include_auth": true, "json_snapshot_ts": 1, "kv_snapshot_ts": 1, "lsn_cut": { "json": 1, "kv": 1, "rel": 1 }, "luradb_version": "example", "rel_snapshot_ts": 1, "schedule": "example", "scope": "example", "shards": 1, "size_bytes": 1, "started_at": 1, "state": "example"}Invalid backup file — checksum/manifest verification failed
Backup is disabled
Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.