{"record":{"id":"f947e631923313fb","repo":"kopia/kopia","slug":"error-getting-blob-configuration","errorCode":null,"errorMessage":"error getting blob configuration","messagePattern":"error getting blob configuration","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command_repository_upgrade.go","lineNumber":466,"sourceCode":"\t}\n\n\tif mp.EpochParameters.Enabled {\n\t\t// nothing to upgrade on format, so let the next action commit the upgraded format blob\n\t\treturn nil\n\t}\n\n\tmp.EpochParameters = epoch.DefaultParameters()\n\tmp.IndexVersion = 2\n\n\tlog(ctx).Info(\"migrating current indices to epoch format\")\n\n\tif uerr := rep.ContentManager().PrepareUpgradeToIndexBlobManagerV1(ctx); uerr != nil {\n\t\treturn errors.Wrap(uerr, \"error upgrading indices\")\n\t}\n\n\tblobCfg, err := rep.FormatManager().BlobCfgBlob(ctx)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error getting blob configuration\")\n\t}\n\n\t// update format-blob and clear the cache\n\tif err := rep.FormatManager().SetParameters(ctx, mp, blobCfg, rf); err != nil {\n\t\treturn errors.Wrap(err, \"error setting parameters\")\n\t}\n\n\t// we need to reopen the repository after this point\n\n\tlog(ctx).Info(\"Repository indices have been upgraded.\")\n\n\treturn nil\n}\n\n// commitUpgrade is the upgrade CLI phase that commits the upgrade and removes\n// the lock after the actual upgrade phase has been run successfully. We will\n// not end up here if any of the prior phases have failed. This will also\n// cleanup and backups used for the rollback mechanism, so we cannot rollback","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/cli/command_repository_upgrade.go#L448-L484","documentation":"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.","triggerScenarios":"FormatManager().BlobCfgBlob(ctx) errors — the blobcfg blob is missing, unreadable, fails checksum, or the blob storage backend call fails while fetching it.","commonSituations":"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.","solutions":["Retry the upgrade after confirming `kopia repository status` works (transient storage errors are common here)","Verify the blobcfg blob exists in storage and was not manually deleted","Reconnect with correct credentials/password: `kopia repository connect`","Check blob storage backend health/throttling and retry with backoff","Restore format metadata from a backup if the blobcfg blob is corrupted"],"exampleFix":"// before: retrying the whole upgrade on transient storage errors\nblobCfg, err := rep.FormatManager().BlobCfgBlob(ctx)\n// after: retry transient blob reads\nvar blobCfg blobcfg.BlobCfg\nerr := retry.WithExponentialBackoff(ctx, \"read BlobCfgBlob\", func() error {\n    var e error\n    blobCfg, e = rep.FormatManager().BlobCfgBlob(ctx)\n    return e\n})","handlingStrategy":"retry","validationCode":"// confirm the blobcfg is readable before starting the upgrade\nif _, err := rep.FormatManager().BlobCfgBlob(ctx); err != nil {\n    return fmt.Errorf(\"blob configuration unreadable, resolve before upgrade: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"// retry transient storage errors\nerr := retry.WithExponentialBackoff(ctx, \"read BlobCfgBlob\", func() error {\n    _, e := rep.FormatManager().BlobCfgBlob(ctx)\n    return e\n})","preventionTips":["Ensure reliable, low-error-rate connectivity to the blob store","Do not delete blobcfg metadata blobs from storage manually","Keep client and repository format versions compatible","Verify with `kopia repository status` prior to upgrading"],"tags":["cli","repository","upgrade","storage"],"backgroundTag":"resource-not-found","analyzedSha":"82495e54b584c1ef6073c9e1be048f57f8aef078","analyzedAt":"2026-09-07T20:35:21.689Z","contentChangedAt":"2026-09-07T20:35:21.689Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}