gastownhall/beads · warning
no backup destination configured
Error message
no backup destination configured
What it means
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.
Source
Thrown at cmd/bd/backup_dolt.go:432
defer func() {
if c := metrics.Global(); c != nil {
c.CloseEventAndAdd(evt)
}
}()
ctx := rootCtx
if store == nil {
return fmt.Errorf("no store available")
}
bs, ok := storage.UnwrapStore(store).(storage.BackupStore)
if !ok {
return fmt.Errorf("storage backend does not support backup operations")
}
if err := bs.BackupRemove(ctx, defaultDoltBackupName); err != nil {
if strings.Contains(err.Error(), "not found") || strings.Contains(err.Error(), "no backup") {
return fmt.Errorf("no backup destination configured")
}
return fmt.Errorf("failed to remove backup: %w", err)
}
// Also remove backup_export if it exists (auto-export may have created it at same URL)
_ = bs.BackupRemove(ctx, "backup_export")
// Remove local config
if path, err := doltBackupConfigPath(); err == nil {
_ = os.Remove(path)
}
if path, err := doltBackupStatePath(); err == nil {
_ = os.Remove(path)
}
if jsonOutput {
return outputJSON(map[string]interface{}{"removed": true})
}View on GitHub (pinned to 71377f2769)
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
Example fix
// before bd backup remove // error: no backup destination configured // after: check first bd backup status || echo "no backup configured; nothing to remove"
Defensive patterns
Strategy: try-catch
Validate before calling
// check a destination exists before removing
if _, err := os.Stat(filepath.Join(beads.FindBeadsDir(), "dolt-backup.json")); os.IsNotExist(err) {
// nothing configured; skip remove
} Try / catch
if err := bs.BackupRemove(ctx, defaultDoltBackupName); err != nil {
if strings.Contains(err.Error(), "not found") || strings.Contains(err.Error(), "no backup") {
return fmt.Errorf("no backup destination configured") // treat as idempotent no-op
}
return fmt.Errorf("failed to remove backup: %w", err)
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- failed to remove backup: %w
- failed to get current commit: %w
- storage backend does not support backup operations
- failed to get current commit for state: %w
- backup destination does not exist: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/8b3fa6ef55d02f76.
Report an issue: GitHub.