{"record":{"id":"bc8c564481d49065","repo":"risingwavelabs/risingwave","slug":"snapshot-id-not-found","errorCode":null,"errorMessage":"snapshot id {} not found","messagePattern":"snapshot id (.+?) not found","errorType":"exception","errorClass":"BackupError","httpStatus":null,"severity":"error","filePath":"src/meta/src/backup_restore/restore.rs","lineNumber":169,"sourceCode":"    backup_store: Option<MetaSnapshotStorageRef>,\n) -> BackupResult<()> {\n    if cfg!(not(test)) {\n        assert!(meta_store.is_none());\n        assert!(backup_store.is_none());\n    }\n    let meta_store = match meta_store {\n        None => get_meta_store(opts.clone()).await?,\n        Some(m) => m,\n    };\n    let backup_store = match backup_store {\n        None => get_backup_store(opts.clone()).await?,\n        Some(b) => b,\n    };\n    let target_id = opts.meta_snapshot_id;\n    let snapshot_list = &backup_store.manifest().await.snapshot_metadata;\n    let snapshot = match snapshot_list.iter().find(|m| m.id == target_id) {\n        None => {\n            return Err(BackupError::Other(anyhow::anyhow!(\n                \"snapshot id {} not found\",\n                target_id\n            )));\n        }\n        Some(s) => s,\n    };\n\n    if opts.validate_integrity {\n        tracing::info!(\"Start integrity validation.\");\n        validate_integrity(\n            snapshot.objects.clone(),\n            &opts.hummock_storage_url,\n            &opts.hummock_storage_directory,\n        )\n        .await\n        .inspect_err(|_| tracing::error!(\"Fail integrity validation.\"))?;\n        tracing::info!(\"Succeed integrity validation.\");\n    }","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/backup_restore/restore.rs#L151-L187","documentation":"restore_impl looks up the requested meta snapshot id (`opts.meta_snapshot_id`) in the backup store's manifest snapshot_metadata list; if no entry matches, it errors that the snapshot id was not found. The restore cannot proceed without a valid snapshot to load.","triggerScenarios":"Running a meta restore (`risectl meta restore` / recovery tooling) with a `--meta-snapshot-id` that does not exist in the configured backup store.","commonSituations":"Typo in the snapshot id; pointing restore at the wrong backup storage url/directory so the manifest lacks the id; the snapshot was deleted by cleanup before restore.","solutions":["List available snapshots (`risectl meta list-backup`) and use a valid id","Verify backup storage url/directory/endpoint options point at the correct backup store","Re-check whether the snapshot was deleted; if so use an existing snapshot id"],"exampleFix":"// before\nrisectl meta restore --meta-snapshot-id 42\n// after\nrisectl meta list-backup  # find existing id\nrisectl meta restore --meta-snapshot-id <valid_id>","handlingStrategy":"validation","validationCode":"let ids: Vec<_> = backup_store.manifest().await.snapshot_metadata.iter().map(|m| m.id).collect();\nif !ids.contains(&target_id) { return Err(anyhow!(\"snapshot {} unavailable; have {:?}\", target_id, ids)); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["List available snapshots before restoring","Pin snapshot ids in runbooks and verify backups still exist","Guard cleanup jobs from deleting snapshots still needed for DR"],"tags":["rust","meta","restore","backup"],"backgroundTag":"record-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}