{"record":{"id":"45bd8aad6560e2ba","repo":"weaviate/weaviate","slug":"s-s-s","errorCode":null,"errorMessage":"%s: %s > %s","messagePattern":"%s: %s > %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/backup/handler.go","lineNumber":89,"sourceCode":"}\n\n// maxMajorVersion is the newest backup-structure major version this build restores.\nvar maxMajorVersion, _ = parseMajor(Version)\n\n// checkRestorableVersion refuses backups this build cannot restore, either because their\n// format is too old or because a later Weaviate produced them. version is the\n// backup-structure version; serverVersion is the Weaviate version that wrote it.\nfunc checkRestorableVersion(version, serverVersion string) error {\n\t// An empty version means a corrupt descriptor rather than an old one; Validate reports it.\n\tif version != \"\" && version <= version1 {\n\t\treturn errLegacyUncompressed\n\t}\n\tif serverVersionOlderThan(serverVersion, 1, 23) {\n\t\treturn errLegacyFlatFS\n\t}\n\t// A structure version may omit the minor, so compare majors only.\n\tif major, ok := parseMajor(version); ok && major > maxMajorVersion {\n\t\treturn fmt.Errorf(\"%s: %s > %s\", errMsgHigherVersion, version, Version)\n\t}\n\treturn nil\n}\n\n// parseMajor reads the leading number of a \"major[.minor[.patch]]\" version. ok is false\n// when it is missing or unparseable.\nfunc parseMajor(version string) (major int, ok bool) {\n\tmajor, err := strconv.Atoi(strings.Split(version, \".\")[0])\n\treturn major, err == nil\n}\n\n// parseVersion splits a \"major.minor[.patch]\" version. ok is false when either number is\n// missing or unparseable.\nfunc parseVersion(version string) (major, minor int, ok bool) {\n\tparts := strings.Split(version, \".\")\n\tif len(parts) < 2 {\n\t\treturn 0, 0, false\n\t}","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/backup/handler.go#L71-L107","documentation":"checkRestorableVersion refuses to restore a backup whose structure major version exceeds the running server's major version (maxMajorVersion, parsed from the Weaviate build version). Forward-restore is unsupported because the backup format may be newer than the code understands. The message reads 'unable to restore backup as it was produced by a higher version: <backupVersion> > <serverVersion>'.","triggerScenarios":"validateRestoreRequest/validate -> checkRestorableVersion finds the descriptor's structure version major greater than the current Weaviate major version — e.g. restoring a backup made on Weaviate v2.x (or a newer major) into a v1.x server, or restoring into a downgraded cluster.","commonSituations":"Cluster was downgraded after the backup was taken; disaster-recovery site runs an older Weaviate than production; mixing releases across environments.","solutions":["Upgrade the target Weaviate to a version >= the version that produced the backup (shown in the error).","If upgrade is impossible, restore on a cluster running the backup's version (or newer within the same major), then migrate data via client export.","Never downgrade a cluster below the version of its most recent backups if restore capability matters."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if major, ok := parseMajor(desc.StructureVersion); ok {\n    var cur int\n    fmt.Sscanf(Version, \"%d\", &cur)\n    if major > cur {\n        return fmt.Errorf(\"backup from newer Weaviate (%s > %s); upgrade target\", desc.StructureVersion, Version)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := coordinator.Restore(ctx, req); err != nil {\n    if strings.Contains(err.Error(), \"produced by a higher version\") {\n        // upgrade the target cluster to the backup's version before retrying\n    }\n}","preventionTips":["Keep DR/restore environments at the same or newer Weaviate version than production.","Pin cluster versions in infrastructure-as-code to prevent accidental downgrades.","Record the producing Weaviate version with each backup and check it in restore runbooks."],"tags":["backup","restore","version-compatibility"],"backgroundTag":"backup-version-incompatible","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}