{"record":{"id":"8b3fa6ef55d02f76","repo":"gastownhall/beads","slug":"no-backup-destination-configured","errorCode":null,"errorMessage":"no backup destination configured","messagePattern":"no backup destination configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/bd/backup_dolt.go","lineNumber":432,"sourceCode":"\t\tdefer func() {\n\t\t\tif c := metrics.Global(); c != nil {\n\t\t\t\tc.CloseEventAndAdd(evt)\n\t\t\t}\n\t\t}()\n\n\t\tctx := rootCtx\n\t\tif store == nil {\n\t\t\treturn fmt.Errorf(\"no store available\")\n\t\t}\n\n\t\tbs, ok := storage.UnwrapStore(store).(storage.BackupStore)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"storage backend does not support backup operations\")\n\t\t}\n\n\t\tif err := bs.BackupRemove(ctx, defaultDoltBackupName); err != nil {\n\t\t\tif strings.Contains(err.Error(), \"not found\") || strings.Contains(err.Error(), \"no backup\") {\n\t\t\t\treturn fmt.Errorf(\"no backup destination configured\")\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"failed to remove backup: %w\", err)\n\t\t}\n\n\t\t// Also remove backup_export if it exists (auto-export may have created it at same URL)\n\t\t_ = bs.BackupRemove(ctx, \"backup_export\")\n\n\t\t// Remove local config\n\t\tif path, err := doltBackupConfigPath(); err == nil {\n\t\t\t_ = os.Remove(path)\n\t\t}\n\t\tif path, err := doltBackupStatePath(); err == nil {\n\t\t\t_ = os.Remove(path)\n\t\t}\n\n\t\tif jsonOutput {\n\t\t\treturn outputJSON(map[string]interface{}{\"removed\": true})\n\t\t}","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/backup_dolt.go#L414-L450","documentation":"When removing the configured Dolt backup, if bs.BackupRemove returns an error whose message contains 'not found' or 'no backup', the command translates it into the friendlier 'no backup destination configured'. This means removal was attempted but no backup destination was ever registered under the default backup name — the Dolt-side backup config is absent.","triggerScenarios":"Running `bd backup remove` in a workspace where `bd backup` (add/configure) was never run, or after the Dolt backup entry named defaultDoltBackupName was already deleted (manually via dolt or by a previous remove that left stale local config).","commonSituations":"Double-removing a backup, fresh clone that never had the backup configured, manually cleaning Dolt remotes/backups with the dolt CLI then using bd backup remove.","solutions":["Nothing to remove — verify with 'bd backup status' or dolt's backup list; this is an expected/idempotent outcome","If local config (dolt-backup.json) still exists, delete it or re-run remove once more if the command cleans local config only after success","Re-create the backup first with 'bd backup <url>' if you intended to reset rather than remove"],"exampleFix":"// before\nbd backup remove\n// error: no backup destination configured\n// after: check first\nbd backup status || echo \"no backup configured; nothing to remove\"","handlingStrategy":"try-catch","validationCode":"// check a destination exists before removing\nif _, err := os.Stat(filepath.Join(beads.FindBeadsDir(), \"dolt-backup.json\")); os.IsNotExist(err) {\n    // nothing configured; skip remove\n}","typeGuard":null,"tryCatchPattern":"if err := bs.BackupRemove(ctx, defaultDoltBackupName); err != nil {\n    if strings.Contains(err.Error(), \"not found\") || strings.Contains(err.Error(), \"no backup\") {\n        return fmt.Errorf(\"no backup destination configured\") // treat as idempotent no-op\n    }\n    return fmt.Errorf(\"failed to remove backup: %w\", err)\n}","preventionTips":["Make remove idempotent in scripts: ignore 'no backup destination configured'","Check 'bd backup status' before remove","Avoid manual dolt CLI backup manipulation that desyncs bd's config"],"tags":["go","dolt","backup"],"backgroundTag":"backup-not-configured","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}