Skip to content

OpenHuman: layout migration, archive and storage CLI #7997

Closed

Description

@senamakel

New storage/layout/. Steps:

  1. Take an OS lock.
  2. Run the legacy importers into the old DB under the right tenant.
  3. Run the schema migrations.
  4. VACUUM INTO users/<id>/storage.db and verify counts.
  5. Move user files to files/.
  6. Stream backups/<user>-<ts>.tar.zst with a manifest and verify it.
  7. Delete the classified originals.

Every step is resumable. It is a no-op for Mongo or explicit URLs. Controllers storage.migrate {dry_run}, storage.status and storage.restore go through core/all.rs. Boot auto-migrate stays behind a flag.

Part of #7973.

Activity

  1. added
    priority: p3Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.
    on Oct 16, 2026
  2. tinysweeper commented on Oct 16, 2026

    @tinysweeper

    Storage layout migration, archive and restore CLI as part of the uniform storage epic; implementation work is planning/scoped and explicitly notes it is a sub-issue of #7973, so no separate bug or feature triage is warranted.

    Labelled priority: p3.

  3. added theissue type on Oct 16, 2026
  4. senamakel commented on Oct 17, 2026

    @senamakel
    MemberAuthor

    Done in senamakel#164, merged into the epic branch. It adds storage::layout, which migrates a V1 profile in resumable steps:

    1. take the lock
    2. run the legacy importers
    3. run the schema migrations
    4. VACUUM INTO storage.db and verify the counts
    5. move user files into files/
    6. write backups/<user>-<ts>.tar.zst with a manifest and verify it
    7. write the marker, then delete only the classified originals

    Unknown entries are left in place. It also adds the storage.migrate {dry_run}, storage.status and storage.restore controllers, plus [storage] auto_migrate_layout (off by default). Sub-agent lifecycle, computer site memory and the module importers are left to their existing lazy importers under V2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority: p3Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions