Skip to content

[Feature]: Add helix branch command to clone database for new instances #787

@xav-db

Description

@xav-db

What do you want?

Summary

Add a helix branch command that safely copies the LMDB database to a new directory and optionally deploys a new instance using the branched data.

Background

LMDB supports safely cloning the .mdb file while the database is running via its env copy method. This logic is already implemented for the backup command.

Proposed Implementation

  1. CLI copies the database externally - The CLI can perform the copy while the instance is running without needing to communicate with the instance (same approach as backup command)
  2. Deploy new instance - After copying, the branch command could deploy a new Docker instance using:
    - A different port
    - A modified volume mount pointing to the branched data directory

Feature Area

CLI

Additional context

Technical Notes

  • LMDB env copy duplicates the database so a new env can be opened on the copy
  • No need for an endpoint or runtime volume mount modifications
  • Existing backup command logic can be reused/extended

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions