Currently, go53ctl depends on the go53 API being available for all management operations. This makes administration impossible when the server is offline, unavailable, or during recovery scenarios.
Implement an offline mode for go53ctl that allows direct access to the underlying BadgerDB database without requiring a running go53 server.
Motivation
There are several situations where direct database access is useful:
- Recovery and troubleshooting when the go53 server cannot start.
- Emergency zone modifications.
- Verification and inspection of stored data.
- Maintenance tasks on standalone systems.
- Bootstrapping or migration operations before the API is available.
Proposed Solution
Add an offline mode to go53ctl that:
- Opens the BadgerDB database directly.
- Bypasses all API communication.
- Uses the same internal storage logic as the server where possible.
- Provides read and write access to zones and records.
- Supports validation to prevent database corruption.
Example usage:
go53ctl --offline zone list
go53ctl --offline zone show example.com
go53ctl --offline record add example.com www A 192.0.2.10
Requirements
- Detect and report database lock conflicts gracefully.
- Reuse existing storage/database packages whenever possible.
- Ensure record validation remains consistent with API-based operations.
- Provide clear warnings that changes are being made directly to the database.
- Support both read-only and read-write modes.
Acceptance Criteria
- go53ctl can operate without a running go53 server.
- Zone and record management works directly against BadgerDB.
- Existing validation rules are preserved.
- Error handling is clear and safe.
- Documentation includes examples and operational considerations for offline usage.
Additional Notes
Offline mode should primarily be considered a maintenance and recovery feature. The implementation should minimize duplication by reusing the same storage layer used by the go53 server.
Currently, go53ctl depends on the go53 API being available for all management operations. This makes administration impossible when the server is offline, unavailable, or during recovery scenarios.
Implement an offline mode for go53ctl that allows direct access to the underlying BadgerDB database without requiring a running go53 server.
Motivation
There are several situations where direct database access is useful:
Proposed Solution
Add an offline mode to go53ctl that:
Example usage:
Requirements
Acceptance Criteria
Additional Notes
Offline mode should primarily be considered a maintenance and recovery feature. The implementation should minimize duplication by reusing the same storage layer used by the go53 server.