risingwavelabs/risingwave · error · BackupError

storage_url mismatch: {} {}

Error message

storage_url mismatch: {} {}

What it means

When NOT overwriting the hummock storage endpoint, dispatch compares the snapshot's stored storage_url with `opts.hummock_storage_url` and aborts on mismatch. This prevents restoring a snapshot into an environment whose object storage endpoint differs from what the snapshot data references.

Source

Thrown at src/meta/src/backup_restore/restore.rs:224

    target_id: MetaSnapshotId,
    opts: &RestoreOpts,
    loader: L,
    writer: W,
) -> BackupResult<()> {
    // Validate parameters.
    if opts.overwrite_hummock_storage_endpoint
        && (opts.overwrite_backup_storage_url.is_none()
            || opts.overwrite_backup_storage_directory.is_none())
    {
        return Err(BackupError::Other(anyhow::anyhow!("overwrite_hummock_storage_endpoint, overwrite_backup_storage_url, overwrite_backup_storage_directory must be set simultaneously".to_owned())));
    }

    // Restore meta store.
    let target_snapshot = loader.load(target_id).await?;
    if !opts.overwrite_hummock_storage_endpoint {
        let storage_url = target_snapshot.metadata.storage_url()?;
        if storage_url != opts.hummock_storage_url {
            return Err(BackupError::Other(anyhow::anyhow!(
                "storage_url mismatch: {} {}",
                storage_url,
                opts.hummock_storage_url
            )));
        }
        let storage_directory = target_snapshot.metadata.storage_directory()?;
        if storage_directory != opts.hummock_storage_directory {
            return Err(BackupError::Other(anyhow::anyhow!(
                "storage_directory mismatch: {} {}",
                storage_directory,
                opts.hummock_storage_directory
            )));
        }
    }

    if opts.dry_run {
        tracing::info!("Complete dry run.");
        return Ok(());

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Correct `--hummock-storage-url` to match the snapshot's recorded storage_url (visible in restore output/manifest)
  2. If intentionally restoring into a different environment, enable overwrite_hummock_storage_endpoint together with overwrite_backup_storage_url and overwrite_backup_storage_directory
  3. Verify the backup store you loaded from is the intended one

Example fix

// before
risectl meta restore --hummock-storage-url s3://wrong-bucket
// after
risectl meta restore --hummock-storage-url s3://original-bucket  # matches snapshot
# or add: --overwrite-hummock-storage-endpoint --overwrite-backup-storage-url ... --overwrite-backup-storage-directory ...
Defensive patterns

Strategy: validation

Validate before calling

if !opts.overwrite_hummock_storage_endpoint
    && target_snapshot.metadata.storage_url()? != opts.hummock_storage_url {
    return Err(anyhow!("storage_url mismatch; align opts or use overwrite flags"));
}

Prevention

When it happens

Trigger: Restore with overwrite_hummock_storage_endpoint=false while opts.hummock_storage_url differs from target_snapshot.metadata.storage_url().

Common situations: Restoring a backup taken in one cloud/region into a cluster configured with a different S3 endpoint or bucket URL; copy-paste of the wrong storage URL in the restore command.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/ac0795f7196f4634. Report an issue: GitHub.