Skip to content

BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications.

Restore only the neo4j database dump so the fresh instance can come online.

Christian48f297d6fcc7
diff --git a/deploy/backup_restore.py b/deploy/backup_restore.py
index f29cc58..d1cc2f4 100755
--- a/deploy/backup_restore.py
+++ b/deploy/backup_restore.py
@@ -390,7 +390,7 @@ def backup(stack: Stack, backup_root: Path) -> Path:
stack.run(["stop", "neo4j", "mongo", "milvus", "etcd", "minio", "redis"])
neo_dir = destination / "neo4j"
neo_dir.mkdir(mode=0o777)
- for database in ("system", "neo4j"):
+ for database in ("neo4j",):
_neo4j_admin(
stack,
f"{neo_dir}:/backup",
@@ -480,7 +480,7 @@ def restore(stack: Stack, backup_dir: Path) -> None:
tmp_path = Path(tmp)
if not stack.dry_run:
subprocess.run(["tar", "-C", str(tmp_path), "-xzf", str(backup_dir / "neo4j.dumps.tar.gz")], check=True)
- for database in ("system", "neo4j"):
+ for database in ("neo4j",):
_neo4j_admin(
stack,
f"{tmp_path}:/backup:ro",
diff --git a/tests/test_deploy_production_contract.py b/tests/test_deploy_production_contract.py
index ba29387..f6fc437 100644
--- a/tests/test_deploy_production_contract.py
+++ b/tests/test_deploy_production_contract.py
@@ -135,6 +135,8 @@ def test_heavy_neo4j_dump_runs_as_root_with_admin_entrypoint():
assert '"0"' in source
assert '"--entrypoint"' in source
assert '"neo4j-admin"' in source
+ assert source.count('("neo4j",)') == 2
+ assert '("system", "neo4j")' not in source
def test_recommendation_openapi_surface_is_preview():