{"record":{"id":"eb71022205f87a95","repo":"databendlabs/databend","slug":"importing-from-v001-is-not-supported-since-2024-06","errorCode":null,"errorMessage":"importing from V001 is not supported since 2024-06-12, please use an older version databend-metactl to import from V001","messagePattern":"importing from V001 is not supported since 2024-06-12, please use an older version databend-metactl to import from V001","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/control/src/import.rs","lineNumber":95,"sourceCode":"\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}\n\n/// Read every line from stdin or restore file, deserialize it into tree_name, key and value.\n/// Insert them into sled db and flush.\n///\n/// Finally upgrade the data in raft_dir to the latest version.\nasync fn import_from_stdin_or_file<SP: SpawnApi>(","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/meta/control/src/import.rs#L77-L113","documentation":"Raised in import_lines when the exported meta snapshot uses the V001 data version. Support for importing V001 snapshots ended on 2024-06-12; the current databend-metactl rejects the import and directs the user to an older metactl version compatible with that format.","triggerScenarios":"Running `metactl --import` with a dump whose version header is DataVersion::V001.","commonSituations":"Restoring backups exported between the V0 sunset and 2024-06-12; scripted DR restore using an outdated dump file.","solutions":["Use a databend-metactl release from before 2024-06-12 to import the V001 dump","Re-export data from the source cluster using a current version producing V002+ format","Verify the dump version header before planning the restore"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let version = reading::read_version(&mut lines.peekable())?;\nif matches!(version, DataVersion::V0 | DataVersion::V001) {\n    eprintln!(\"legacy dump: use an older databend-metactl release\");\n}","typeGuard":null,"tryCatchPattern":"match import_lines(raft_config, lines).await {\n    Err(e) if e.to_string().contains(\"V001 is not supported\") => eprintln!(\"use pre-2024-06 metactl or re-export as V002+\"),\n    other => other,\n}","preventionTips":["Prefer re-exporting with current metactl over importing legacy formats","Version-tag every backup dump file","Test restore workflows with the exact dump format you keep"],"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"}