'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 1:[1]
I had a similar problem and had to first drop the database DROP DATABASE neo4j then create a new database CREATE DATABASE neo4j.
Solution 2:[2]
You're describing an issue where the browser lost connection to the database (since you stopped the database in order to reload from file). To connect anew, close the browser and open a new window (example: http://localhost:7474/browser/); this should prompt you to connect again. It is possible to reconnect an old browser window after database shutdown+start, but close+open is easier to explain.
Also, to confirm your other steps, they look fine for taking the dump and loading it. The following works for me with neo4j Community 4.4.5:
first, stop the database:
% ./bin/neo4j stop Stopping Neo4j....... stopped.run
dump, saving to a new file named "export.dat":% ./bin/neo4j-admin dump --database=neo4j --to=export.dat Selecting JVM - Version:11.0.14+8-LTS-263, Name:Java HotSpot(TM) 64-Bit Server VM, Vendor:Oracle Corporation Done: 40 files, 334.5MiB processed.run
loadto put "export.dat" back to the same "neo4j" database:% ./bin/neo4j-admin load --from=export.dat --database=neo4j --force Selecting JVM - Version:11.0.14+8-LTS-263, Name:Java HotSpot(TM) 64-Bit Server VM, Vendor:Oracle Corporation Done: 40 files, 334.5MiB processed.start the database again:
% ./bin/neo4j start Directories in use: [...] Starting Neo4j. Started neo4j (pid:3852). It is available at http://localhost:7474 There may be a short delay until the server is ready.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | kaan |
| Solution 2 | kaan |
