Docs / EventSourcingDB / Errors / backup-format-unknown

backup-format-unknown

A part of the backup has a format version that this version does not know.

  • Route: restore-backup
  • Description: backup format is unknown: expected a backup item of version 2, or a backup that v1 wrote, which has no backup item
  • Details: part, the place of the part in the backup, counting from 0, with the full backup as part 0, and value, the formatVersion as the part gave it, as a number; without value if the part names no version.

Why It Happens#

Each part of a backup that the v2 API created begins with a backup item, whose formatVersion names the version of its format. This version of EventSourcingDB creates and restores version 2. It also restores a backup that the v1 API created, which has no backup item and so names no version. A backup item with another version, or without one, is refused.

Another version comes from a backup that a newer version of EventSourcingDB created, or from a backup item that was changed by hand.

How to Fix It#

Restore the backup with the version of EventSourcingDB that created it, or a newer one. EventSourcingDB has removed what it restored so far, so the database is empty again. Resending the request to this version fails the same way.

Example#

For a restore whose full backup names the format version 3, 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/backup-format-unknown",
    "description": "backup format is unknown: expected a backup item of version 2, or a backup that v1 wrote, which has no backup item",
    "details": {
      "part": 0,
      "value": 3
    }
  }
}