Docs / EventSourcingDB / Errors / full-backup-missing

full-backup-missing

A restore starts with an increment rather than with a full backup.

  • Route: restore-backup
  • Description: full backup is missing: expected a full backup before its increments
  • Details: None; details is an empty object.

Why It Happens#

A restore takes a full backup followed by its increments, each exactly as creating it sent it, one after the other in one request body. Each of these parts begins with a backup item, whose lastBackedUpEvent names the event the part follows on: null for a full backup, and an event for an increment. Here, the first part names an event, so it is an increment, and the events before it are missing.

A typical cause is to restore the increments alone, or the parts in the wrong order, with an increment before the full backup.

How to Fix It#

Send the full backup first, followed by its increments in the order in which they were created. Nothing has been restored, so the database is still empty. Resending the request unchanged fails the same way.

Example#

For a restore whose body begins with an increment, EventSourcingDB answers with this error, as a line of the stream, and then ends the stream with its end item:

{
  "type": "error",
  "data": {
    "code": "https://docs.eventsourcingdb.io/errors/full-backup-missing",
    "description": "full backup is missing: expected a full backup before its increments",
    "details": {}
  }
}