Feature request: Add Apache IoTDB logical backup and restore support
Summary
I would like to contribute Apache IoTDB support to Databasus. Before starting implementation, I want to confirm whether the maintainers are interested in accepting and maintaining this integration.
The proposed first version would provide full logical backup and restore for Apache IoTDB 2.0.x, starting with 2.0.11. It would use the official IoTDB tools instead of implementing a custom backup format.
Proposed initial scope
- Support Apache IoTDB 2.0.x.
- Support both tree and table models through an explicit
sqlDialectsetting. - Test the connection and detect the server version before saving the database configuration.
- Export schema with the official
export-schema.shtool. - Export data as TsFile with the official
export-data.sh -ft tsfiletool. - Package the schema, TsFiles and a manifest into one archive.
- Send the archive through Databasus's existing encryption, storage, retention and notification pipeline.
- Restore the schema first and then import the TsFiles using the official import tools.
- Add an end-to-end backup → restore test using an official Apache IoTDB Docker image.
- Ensure credentials are not exposed in command logs or error messages.
Out of scope for the first version
- Incremental backups.
- Point-in-time recovery.
- Node-level or cluster-level physical backups using
backup.sh. - Coordinating filesystem backups across ConfigNode and DataNode processes.
- Restore verification through the external verification agent.
These features could be discussed separately after the basic logical backup and restore path is stable.
Implementation direction
IoTDB's export tools write schema and data to multiple files rather than producing one output stream. The implementation would therefore:
- Create a temporary working directory.
- Export the schema and data into that directory.
- Write a manifest containing the IoTDB version, SQL dialect and exported files.
- Archive the directory into a single backup artifact.
- Pass that artifact to the existing Databasus storage pipeline.
- Reliably remove the temporary files after success, failure or cancellation.
This approach fits the existing logical backup workflow without requiring Databasus to access the filesystem of every IoTDB cluster node.
The official IoTDB tools require Java, so the implementation would also need an agreed approach for packaging the required runtime and tools without unnecessarily increasing the main image size.
Contribution plan
I understand that adding a database engine affects several parts of the project and that large, unconfirmed pull requests are difficult to review. I would not start the full implementation before the scope is approved.
If the proposal is acceptable, I can:
- Submit an OpenSpec/design proposal first.
- Agree on the supported versions, backup format and tool-packaging strategy.
- Split the implementation into small, reviewable pull requests.
- Include automated tests with each functional change.
Questions for the maintainers
- Is Apache IoTDB support within the current direction of Databasus?
- Is full logical backup and restore an acceptable initial scope?
- Would you prefer the IoTDB Java tools in the main image or in a separate helper image/process?
- Would you be willing to review this contribution if the design is agreed in advance and the implementation is split into smaller pull requests?
Source: databasus/databasus