{"record":{"id":"0ee453fa4738e416","repo":"databendlabs/databend","slug":"importing-from-v0-is-not-supported-since-2024-03-0","errorCode":null,"errorMessage":"importing from V0 is not supported since 2024-03-01, please use an older version databend-metactl to import from V0","messagePattern":"importing from V0 is not supported since 2024-03-01, please use an older version databend-metactl to import from V0","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/control/src/import.rs","lineNumber":89,"sourceCode":"        return Ok(());\n    }\n\n    init_new_cluster::<SP>(args, nodes, max_log_id).await?;\n    Ok(())\n}\n\n/// Import from lines of exported data and Return the max log id that is found.\nasync fn import_lines<SP: SpawnApi, B: BufRead + 'static>(\n    raft_config: RaftConfig,\n    lines: Lines<B>,\n) -> anyhow::Result<Option<LogId>> {\n    #[allow(clippy::useless_conversion)]\n    let mut it = lines.into_iter().peekable();\n    let version = reading::validate_version(&mut it)?;\n\n    let max_log_id = match version {\n        DataVersion::V0 => {\n            return Err(anyhow::anyhow!(\n                \"importing from V0 is not supported since 2024-03-01,\n                 please use an older version databend-metactl to import from V0\"\n            ));\n        }\n        DataVersion::V001 => {\n            return Err(anyhow::anyhow!(\n                \"importing from V001 is not supported since 2024-06-12,\n                 please use an older version databend-metactl to import from V001\"\n            ));\n        }\n        // v002 v003 v004 share the same exported data format.\n        DataVersion::V002 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,\n        DataVersion::V003 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,\n        DataVersion::V004 => crate::import_v004::import_v004::<SP>(raft_config, it).await?,\n    };\n\n    Ok(max_log_id)\n}","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/control/src/import.rs#L71-L107","documentation":"Raised in import_lines when validate_version detects a meta-service snapshot exported in the legacy V0 data format. V0 export/import support was dropped after 2024-03-01, so the current databend-metactl refuses the import and tells the operator to use an older metactl release to migrate that snapshot first.","triggerScenarios":"Running `metactl --import` against a data file whose version header is DataVersion::V0.","commonSituations":"Restoring a very old backup exported years ago; mixing old export files into a newer cluster migration.","solutions":["Download a databend-metactl version released before 2024-03-01 to import the V0 dump","Export the old cluster's data with a compatible tool chain, or migrate via an intermediate metasrv version","Confirm the dump file's version header; V0 files cannot be imported directly by current metactl"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let version = reading::read_version(&mut lines.peekable())?;\nif matches!(version, DataVersion::V0) {\n    eprintln!(\"V0 dump: use pre-2024-03 databend-metactl\");\n}","typeGuard":null,"tryCatchPattern":"match import_lines(raft_config, lines).await {\n    Err(e) if e.to_string().contains(\"V0 is not supported\") => eprintln!(\"download an older databend-metactl to import this dump\"),\n    other => other,\n}","preventionTips":["Record the dump version when exporting data","Re-export old clusters with current tooling before retirement","Keep an archive of older metactl binaries for DR restores"],"tags":["compatibility","import","versioning"],"backgroundTag":"unsupported-operation","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}