Skip to content

feat: bank export/import for backup and portability #742

@chriscoey

Description

@chriscoey

Use case

I'm using Hindsight as a primary long-lived engineering knowledge base — replacing a 465-file markdown vault that was my institutional memory. Over time I expect thousands of retained facts, entities, observations, and mental models in a single bank.

Unlike ephemeral conversational memory, this data is irreplaceable if lost. There's currently no way to export bank contents or restore them after a DB issue.

Request

A CLI command or API endpoint to export and import bank contents, e.g.:

# Export all memory units, entities, observations, mental models for a bank
hindsight-api export --bank rai --format jsonl > rai-backup.jsonl

# Import into a fresh or existing bank
hindsight-api import --bank rai < rai-backup.jsonl

JSONL would be ideal (streamable, inspectable), but any structured format works.

Why this matters

  • Disaster recovery: embedded pg0 database corruption means total knowledge loss with no recovery path
  • Migration: switching embedding models requires clearing vectors; export/re-import would preserve facts without re-retaining (saving LLM calls)
  • Portability: moving between machines, sharing bank contents across team members
  • Debugging: inspecting raw bank contents outside the DB

Current workaround

Copying ~/.pg0/instances/hindsight/ as a raw PostgreSQL data directory backup. This works but is opaque, non-portable across Hindsight versions, and can't be inspected or selectively restored.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions