{"record":{"id":"129f8085eca91906","repo":"thanos-io/thanos","slug":"repair-is-specified-so-backup-client-is-required","errorCode":null,"errorMessage":"repair is specified, so backup client is required","messagePattern":"repair is specified, so backup client is required","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/tools_bucket.go","lineNumber":363,"sourceCode":"\t\t\treturn err\n\t\t}\n\n\t\tbkt, err := client.NewBucket(logger, confContentYaml, component.Bucket.String(), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tinsBkt := objstoretracing.WrapWithTraces(objstore.WrapWithMetrics(bkt, extprom.WrapRegistererWithPrefix(\"thanos_\", reg), bkt.Name()))\n\t\tdefer runutil.CloseWithLogOnErr(logger, insBkt, \"bucket client\")\n\n\t\tbackupconfContentYaml, err := objStoreBackupConfig.Content()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tvar backupBkt objstore.Bucket\n\t\tif len(backupconfContentYaml) == 0 {\n\t\t\tif tbc.repair {\n\t\t\t\treturn errors.New(\"repair is specified, so backup client is required\")\n\t\t\t}\n\t\t} else {\n\t\t\t// nil Prometheus registerer: don't create conflicting metrics.\n\t\t\tbackupBkt, err = client.NewBucket(logger, backupconfContentYaml, component.Bucket.String(), nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tinsBkt = objstoretracing.WrapWithTraces(objstore.WrapWithMetrics(bkt, nil, bkt.Name()))\n\n\t\t\tdefer runutil.CloseWithLogOnErr(logger, backupBkt, \"backup bucket client\")\n\t\t}\n\n\t\t// Dummy actor to immediately kill the group after the run function returns.\n\t\tg.Add(func() error { return nil }, func(error) {})\n\n\t\tr, err := issuesVerifiersRegistry.SubstractByIDs(tbc.issuesToVerify, tbc.repair)\n\t\tif err != nil {\n\t\t\treturn err","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/tools_bucket.go#L345-L381","documentation":"`thanos tools bucket repair` was requested but no backup object store was configured (--objstore-backup). Repair mutates blocks destructively, so without a backup bucket the tool refuses to run. Input at fault: missing backup config.","triggerScenarios":"Thrown at cmd/thanos/tools_bucket.go:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure --objstore-backup.config-file with a valid backup bucket","Or drop the --repair flag if repair is not intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}