{"record":{"id":"75fa1b5678074560","repo":"gastownhall/beads","slug":"unknown-backend-q-the-supported-backend-is-dolt","errorCode":null,"errorMessage":"unknown backend %q: the supported backend is \"dolt\" (default)","messagePattern":"unknown backend %q: the supported backend is \"dolt\" \\(default\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":542,"sourceCode":"\t\t\t\tTLSServerName:   externalTLSServerName,\n\t\t\t\tTLSSkipVerify:   externalTLSSkipVerify,\n\t\t\t\tKeepAlivePeriod: externalKeepAlive,\n\t\t\t}\n\t\t\tif err := cfg.Validate(); err != nil {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-external-*: %v\", err)\n\t\t\t}\n\t\t\texternalConfig = &cfg\n\t\t}\n\n\t\t// Backend selection: Dolt is the only supported backend.\n\t\tif !configfile.IsSupportedBackend(backendFlag) {\n\t\t\tswitch backendFlag {\n\t\t\tcase configfile.BackendPostgres, configfile.BackendMySQL:\n\t\t\t\treturn fmt.Errorf(\"storage backend %q is no longer supported: %s; the supported backend is \\\"dolt\\\" (default)\", backendFlag, configfile.RemovedBackendRationale)\n\t\t\tcase configfile.BackendSQLite:\n\t\t\t\treturn fmt.Errorf(\"storage backend %q is no longer supported: %s; the supported backend is \\\"dolt\\\" (default)\", backendFlag, configfile.RemovedSQLiteRationale)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"unknown backend %q: the supported backend is \\\"dolt\\\" (default)\", backendFlag)\n\t\t}\n\t\t// A registered extension backend passes IsSupportedBackend so its\n\t\t// existing workspaces can be opened, but init provisions Dolt only and\n\t\t// would otherwise create the workspace and persist backend: dolt. Reject\n\t\t// it here rather than silently creating the wrong workspace; downstream\n\t\t// registrants supply their own workspace-creation path.\n\t\tif backends.Registered(backendFlag) {\n\t\t\treturn fmt.Errorf(\"backend %q cannot be created by bd init; it can only open an existing workspace (bd init provisions \\\"dolt\\\", the default)\", backendFlag)\n\t\t}\n\t\tfor _, legacyFlag := range removedBackendInitFlags {\n\t\t\tif cmd.Flags().Changed(legacyFlag.name) {\n\t\t\t\treturn fmt.Errorf(\"--%s belonged to %s: %s; use --backend=dolt (the default)\", legacyFlag.name, legacyFlag.origin, legacyFlag.rationale)\n\t\t\t}\n\t\t}\n\t\t// Validate --database format early, before any side effects.\n\t\tif database != \"\" {\n\t\t\tif err := dolt.ValidateDatabaseName(database); err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid database name %q: %v\", database, err)","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L524-L560","documentation":"Generic branch of the backend check: any --backend value that is neither a known removed backend nor a supported/registered one gets this 'unknown backend' error. Dolt is the only supported default.","triggerScenarios":"`bd init --backend=<typo>` such as --backend=postgress, --backend=doltdb, --backend=dolt; anything failing configfile.IsSupportedBackend and not matching postgres/mysql/sqlite.","commonSituations":"Typos in --backend values, case-sensitivity mistakes, copied flags from other tools (e.g. 'bolt', 'dolt'), empty or malformed values in scripts.","solutions":["Check the exact --backend value spelling (must be dolt for init)","Remove the --backend flag entirely to use the default","List registered backends via the configfile package or docs to see valid names"],"exampleFix":"// before\nbd init --backend=postgress\n// after\nbd init --backend=dolt","handlingStrategy":"validation","validationCode":"VALID_BACKENDS=\"dolt\"\ncase \":$VALID_BACKENDS:\" in\n  *\":$BACKEND:\"*) ;;\n  *) echo \"unknown backend: $BACKEND\"; exit 1 ;;\nesac","typeGuard":null,"tryCatchPattern":"if err := bdInit(\"--backend=\" + backend); err != nil {\n    if strings.Contains(err.Error(), \"unknown backend\") {\n        // fix flag value or drop the flag\n    }\n}","preventionTips":["Only ever pass --backend=dolt for bd init","Copy flag values exactly; backend names are lowercase","Avoid building --backend values from unchecked variables"],"tags":["cli","backend","init","typo"],"backgroundTag":"unsupported-backend","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}