kopia/kopia · error

error getting blob configuration

Error message

error getting blob configuration

What it means

During `kopia repository upgrade`, after migrating the indices, the command reads the current blob configuration via FormatManager().BlobCfgBlob(ctx) so it can re-apply it when setting new parameters. Failure here is wrapped as "error getting blob configuration" and aborts before any changes are committed. It means the blobcfg (blob-config) metadata blob could not be read or decoded — the upgrade needs it to preserve retention/retry settings across the format change.

Solutions

  1. Retry the upgrade after confirming `kopia repository status` works (transient storage errors are common here)
  2. Verify the blobcfg blob exists in storage and was not manually deleted
  3. Reconnect with correct credentials/password: `kopia repository connect`
  4. Check blob storage backend health/throttling and retry with backoff
  5. Restore format metadata from a backup if the blobcfg blob is corrupted

Example fix

// before: retrying the whole upgrade on transient storage errors
blobCfg, err := rep.FormatManager().BlobCfgBlob(ctx)
// after: retry transient blob reads
var blobCfg blobcfg.BlobCfg
err := retry.WithExponentialBackoff(ctx, "read BlobCfgBlob", func() error {
    var e error
    blobCfg, e = rep.FormatManager().BlobCfgBlob(ctx)
    return e
})
Defensive patterns

Strategy: retry

Validate before calling

// confirm the blobcfg is readable before starting the upgrade
if _, err := rep.FormatManager().BlobCfgBlob(ctx); err != nil {
    return fmt.Errorf("blob configuration unreadable, resolve before upgrade: %w", err)
}

Try / catch

// retry transient storage errors
err := retry.WithExponentialBackoff(ctx, "read BlobCfgBlob", func() error {
    _, e := rep.FormatManager().BlobCfgBlob(ctx)
    return e
})

Prevention

When it happens

Trigger: FormatManager().BlobCfgBlob(ctx) errors — the blobcfg blob is missing, unreadable, fails checksum, or the blob storage backend call fails while fetching it.

Common situations: Repository upgraded across kopia versions where blobcfg support differs; blobcfg blob deleted or corrupted in storage; transient object-store errors (5xx, throttling) when reading the blob; wrong password preventing decryption of format metadata.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07). Data as JSON: /api/errors/f947e631923313fb. Report an issue: GitHub.

Appendix: source

Thrown at cli/command_repository_upgrade.go:466

	}

	if mp.EpochParameters.Enabled {
		// nothing to upgrade on format, so let the next action commit the upgraded format blob
		return nil
	}

	mp.EpochParameters = epoch.DefaultParameters()
	mp.IndexVersion = 2

	log(ctx).Info("migrating current indices to epoch format")

	if uerr := rep.ContentManager().PrepareUpgradeToIndexBlobManagerV1(ctx); uerr != nil {
		return errors.Wrap(uerr, "error upgrading indices")
	}

	blobCfg, err := rep.FormatManager().BlobCfgBlob(ctx)
	if err != nil {
		return errors.Wrap(err, "error getting blob configuration")
	}

	// update format-blob and clear the cache
	if err := rep.FormatManager().SetParameters(ctx, mp, blobCfg, rf); err != nil {
		return errors.Wrap(err, "error setting parameters")
	}

	// we need to reopen the repository after this point

	log(ctx).Info("Repository indices have been upgraded.")

	return nil
}

// commitUpgrade is the upgrade CLI phase that commits the upgrade and removes
// the lock after the actual upgrade phase has been run successfully. We will
// not end up here if any of the prior phases have failed. This will also
// cleanup and backups used for the rollback mechanism, so we cannot rollback

View on GitHub (pinned to 82495e54b5)