0

I'm working on Rails project with Neo4j.rb and I have a very basic problem: I'd like to dump my data to file (and next load it back). Unfortunately I can't do this. I tried this command:

neo4j-admin dump --database=<database> --to=<destination-path>

but I got this:

neo4j-admin: command not found

So, how can I solve this problem?

Karol Selak
  • 4,248
  • 6
  • 35
  • 65
  • Are you in the right user? You need to be in user `neo4j` to use neo4j-admin and your database must be stopped. – Marj Apr 04 '19 at 22:21
  • I even doesn't know what my password is. I was following this tutorial: https://www.youtube.com/watch?v=n0P0pOP34Mw and there was no step with setting password for `neo4j` user. – Karol Selak Apr 06 '19 at 21:32
  • PS: "neo4j" password doesn't work – Karol Selak Apr 06 '19 at 21:33

1 Answers1

0

Okay, I solved the problem. We must run neo4j-admin script using its full path, what was in that case db/neo4j/development/bin/neo4j-admin. So, my final solution is:

db/neo4j/development/bin/neo4j-admin dump --database=graph.db --to=./my_dump

What's maybe important to add: I need my database stopped to do that. We can do this by running rake neo4j:stop, and then restart it by rake neo4j:start.

Karol Selak
  • 4,248
  • 6
  • 35
  • 65