neo4jcypherneo4j-apoccypher-shell

Export data from Neo4j Sandbox


So i've worked with Neo4j sandbox and i have a whole graph there , but my sandbox is gonna expire so i have to export the data , and import it in my localhost community neo4j instance , i tried to use APOC , but the problem is when i call apoc.export.cypher.all(.....) it doesnt work because i have to add apoc.export.file.enabled=true in the neo4j.conf file in my sandbox instance.

-> Whole error : Failed to invoke procedure apoc.export.cypher.all : Caused by: java.lang.RuntimeException: Export to files not enabled, please set apoc.export.file.enabled=true in your neo4j.conf

The problem here is that i can't access the config file on my sandbox , but i can connect to it using cypher-shell.

is there any suggestions so that i can export my data before the sandbox expires. Thanks in advance !!


Solution

  • If the data is not consequent ( for eg. the size of the movies database ), you can export to cypher statements to the browser directly by specifying null for the file option value :

    CALL apoc.export.cypher.all(null, {format: 'plain'})
    YIELD cypherStatements
    RETURN cypherStatements
    

    Then copy the result ( without the enclosing " )

    enter image description here

    And paste it in another Neo4j browser, click on the Run button, and it's done.

    enter image description here