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.

List only Neo4j database directories so store_lock is not dumped.

Christian88922588f58b
diff --git a/deploy/backup_restore.py b/deploy/backup_restore.py
index e3ef942..49dada5 100755
--- a/deploy/backup_restore.py
+++ b/deploy/backup_restore.py
@@ -258,9 +258,17 @@ def _neo4j_user_databases(stack: Stack) -> list[str]:
"--user",
"0",
"--entrypoint",
- "/bin/ls",
+ "/bin/find",
"neo4j",
"/data/databases",
+ "-mindepth",
+ "1",
+ "-maxdepth",
+ "1",
+ "-type",
+ "d",
+ "-printf",
+ "%f\\n",
],
capture=True,
check=False,
diff --git a/tests/test_deploy_production_contract.py b/tests/test_deploy_production_contract.py
index 469f326..b9e7b0a 100644
--- a/tests/test_deploy_production_contract.py
+++ b/tests/test_deploy_production_contract.py
@@ -136,6 +136,7 @@ def test_heavy_neo4j_dump_runs_as_root_with_admin_entrypoint():
assert '"--entrypoint"' in source
assert '"neo4j-admin"' in source
assert "/data/databases" in source
+ assert '"-type"' in source
assert "CREATE DATABASE" in source
assert '("system", "neo4j")' not in source
assert '["up", "-d", "--wait", "neo4j"]' in source