Search code examples
neo4j

neo4j DatabaseNotFoundError, with status "offline"


I had a neo4j database on my personal computer(window 10). When I try to migrate this database to the server(centos7).

I use script like this to export the database:

neo4j-admin  dump --database=neo4j --to=<someplace>/neo4j.dump

I copy the dump file to server, and try to import it to neo4j on my server:

neo4j-admin load --from=/var/lib/neo4j/data/dumps/neo4j.dump --database=neo4j --force

When I start neo4j, and enter the neo4j browser, it says that

DatabaseNotFoundError
Database "neo4j" is unavailable, its status is "offline".

The version of neo4j on my computer and server are both 4.4.3.

How can I restore my database?


Solution

    • In the web console select the system db and run the query show databases
    • It will show if there are any errors
    • Then check the debug.log of neo4j for the reason
    • In my case the issue was, I had used the root user load the dump. I had to manually change file permissions