Apoc.export.csv.all is not writing a csv file

Hey there, I’m attempting to export my graph to a csv file. The query succeeds, but I don’t see the file anywhere on the ec2 instance that hosts my neo4j server.
I’m using version 2025.08, I’m using a cypher-shell command

In my cypher-shell, I run this export command
call apoc.export.csv.all("test.csv", {});

the output from the query looks good, as if it succeeds

+---------------------------------------------------------------------------------------------------------------------------------------------+
| file        | source                        | format | nodes | relationships | properties | time | rows | batchSize | batches | done | data |
+---------------------------------------------------------------------------------------------------------------------------------------------+
| "test.csv" | "database: nodes(8), rels(7)" | "csv"  | 8     | 7             | 8          | 0    | 15   | 20000     | 1       | TRUE | NULL |
+---------------------------------------------------------------------------------------------------------------------------------------------+

Also, when looking at my debug logs, it appears to have succeeded

{"time":"2025-11-26 23:10:36.177+0000","level":"DEBUG","category":"o.n.b.p.c.h.RequestHandler","message":"Submitting job for message RunMessage{bookmarks=[FB:kcwQ5a42XCDyQCSAfvZeuCvHeBmQ], txTimeout=null, accessMode=WRITE,txMetadata={app=cypher-shell_v2025.10.1, type=user-direct}, databaseName='databasetest', impersonatedUser='null', notificationsConfig=Default, statement='call apoc.export.csv.all("test.csv", {})', params=Map{}}"}
{"time":"2025-11-26 23:10:36.177+0000","level":"DEBUG","category":"o.n.b.p.c.c.c.AtomicSchedulingConnection","message":"[bolt-2646] Beginning execution of RunMessage{bookmarks=[FB:kcwQ5a42XCDyQCSAfvZeuCvHeBmQ], txTimeout=null, accessMode=WRITE, txMetadata={app=cypher-shell_v2025.10.1, type=user-direct}, databaseName='databasetest', impersonatedUser='null', notificationsConfig=Default, statement='call apoc.export.csv.all("test.csv", {})', params=Map{}} (queued for 0 ms)"}
{"time":"2025-11-26 23:10:36.204+0000","level":"DEBUG","category":"o.n.b.p.c.c.c.AtomicSchedulingConnection","message":"[bolt-2646] Completed execution of RunMessage{bookmarks=[FB:kcwQ5a42XCDyQCSAfvZeuCvHeBmQ], txTimeout=null, accessMode=WRITE, txMetadata={app=cypher-shell_v2025.10.1, type=user-direct}, databaseName='databasetest', impersonatedUser='null', notificationsConfig=Default, statement='call apoc.export.csv.all("test.csv", {})', params=Map{}} (took 27 ms)"}

I believe the file should be in this folder /var/lib/neo4j/importbut the folder is empty

However, when I attempt to find the test.csv file, I cannot find it on my ec2 instance

find / -name "test.csv" 2>/dev/null

I’ve enabled apoc export and input file in my /etc/neo4j/apoc.conf file
apoc.export.file.enabled=true
apoc.import.file.enabled=true

does anyone have any other suggestions I can try?

I think you are right, it should put the file in your import folder. So check the `server.directories.import` in your neo4j.conf and make sure that the user running the neo4j process have write permissions to that directory.

server.directories.import in my neo4j.conf file was pointing to the same /var/lib/neo4j/import folder. The user running the neo4j process had write permissions to that directory.

I was able to get this to work by using the bolt protocol, this entire time I was using the neo4j protocol