{"record":{"id":"503d85d3c7d83dcc","repo":"ipfs/kubo","slug":"errneedmigration","errorCode":"ErrNeedMigration","errorMessage":"ipfs repo needs migration, please run migration tool.\n","messagePattern":"ipfs repo needs migration, please run migration tool\\.\n","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/fsrepo/fsrepo.go","lineNumber":54,"sourceCode":"\nvar log = logging.Logger(\"fsrepo\")\n\n// RepoVersion is the version number that we are currently expecting to see.\nvar RepoVersion = version.RepoVersion\n\nvar migrationInstructions = `See https://github.com/ipfs/fs-repo-migrations/blob/master/run.md\nSorry for the inconvenience. In the future, these will run automatically.`\n\nvar programTooLowMessage = `Your programs version (%d) is lower than your repos (%d).\nPlease update ipfs to a version that supports the existing repo, or run\na migration in reverse.\n\nSee https://github.com/ipfs/fs-repo-migrations/blob/master/run.md for details.`\n\nvar (\n\tErrNoVersion     = errors.New(\"no version file found, please run 0-to-1 migration tool.\\n\" + migrationInstructions)\n\tErrOldRepo       = errors.New(\"ipfs repo found in old '~/.go-ipfs' location, please run migration tool.\\n\" + migrationInstructions)\n\tErrNeedMigration = errors.New(\"ipfs repo needs migration, please run migration tool.\\n\" + migrationInstructions)\n)\n\ntype NoRepoError struct {\n\tPath string\n}\n\nvar _ error = NoRepoError{}\n\nfunc (err NoRepoError) Error() string {\n\treturn fmt.Sprintf(\"no IPFS repo found in %s.\\nplease run: 'ipfs init'\", err.Path)\n}\n\nconst (\n\tapiFile      = \"api\"\n\tgatewayFile  = \"gateway\"\n\tswarmKeyFile = \"swarm.key\"\n)\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/repo/fsrepo/fsrepo.go#L36-L72","documentation":"Sentinel ErrNeedMigration: the on-disk repo's version is lower than RepoVersion, i.e. the repo was created by an older kubo and must be migrated before this binary can open it. The daemon detects this and offers to run migrations automatically.","triggerScenarios":"Thrown at repo/fsrepo/fsrepo.go:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Let the daemon run the migration automatically (answer the prompt / ensure no illegal downgrade)","Or run 'ipfs repo migrate' / fs-repo-migrations manually first","Keep a backup of $IPFS_PATH before migrating"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}