risingwavelabs/risingwave · error · BackupError
snapshot id {} not found
Error message
snapshot id {} not found What it means
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.
Source
Thrown at src/meta/src/backup_restore/restore.rs:169
backup_store: Option<MetaSnapshotStorageRef>,
) -> BackupResult<()> {
if cfg!(not(test)) {
assert!(meta_store.is_none());
assert!(backup_store.is_none());
}
let meta_store = match meta_store {
None => get_meta_store(opts.clone()).await?,
Some(m) => m,
};
let backup_store = match backup_store {
None => get_backup_store(opts.clone()).await?,
Some(b) => b,
};
let target_id = opts.meta_snapshot_id;
let snapshot_list = &backup_store.manifest().await.snapshot_metadata;
let snapshot = match snapshot_list.iter().find(|m| m.id == target_id) {
None => {
return Err(BackupError::Other(anyhow::anyhow!(
"snapshot id {} not found",
target_id
)));
}
Some(s) => s,
};
if opts.validate_integrity {
tracing::info!("Start integrity validation.");
validate_integrity(
snapshot.objects.clone(),
&opts.hummock_storage_url,
&opts.hummock_storage_directory,
)
.await
.inspect_err(|_| tracing::error!("Fail integrity validation."))?;
tracing::info!("Succeed integrity validation.");
}View on GitHub (pinned to 6469eb736d)
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
Example fix
// before risectl meta restore --meta-snapshot-id 42 // after risectl meta list-backup # find existing id risectl meta restore --meta-snapshot-id <valid_id>
Defensive patterns
Strategy: validation
Validate before calling
let ids: Vec<_> = backup_store.manifest().await.snapshot_metadata.iter().map(|m| m.id).collect();
if !ids.contains(&target_id) { return Err(anyhow!("snapshot {} unavailable; have {:?}", target_id, ids)); } Prevention
- 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
When it happens
Trigger: Running a meta restore (`risectl meta restore` / recovery tooling) with a `--meta-snapshot-id` that does not exist in the configured backup store.
Common situations: 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.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- concurrent backup job is not supported: existent job {}
- too many existent meta snapshots, expect at most {}
- inconsistent hummock version: expected {}, actual {}
- not supported: write model V1 to meta store V2
- overwrite_hummock_storage_endpoint, overwrite_backup_storage
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/bc8c564481d49065.
Report an issue: GitHub.