I'm trying to dump a database on Neo4j Desktop 3.5.0 with:
...\bin> neo4j-admin dump --database=graph.db --to=/backup/db1.dump
And getting
command failed: Active logical log detected, this might be a source of inconsistencies.
Please recover database before running the dump.
To perform recovery please start database and perform clean shutdown.
The documentation states that "neo4j-admin must be invoked as the neo4j user in order to ensure the appropriate file permissions.". Might that be the problem?
If so, how to "invoke as the neo4j user"?
found workaround.
shutdown database
open terminal
run bin/neo4j console
after startup, hit Ctrl+C to shutdown database
then, run neo4j-admin dump respectivery
confirmed on Neo4j Desktop 1.1.15
This may be a known issue in version 3.5.0.
I had the same problem on Neo4j 4.1, what worked for me was to simply:
Stop the database
Start the database
Stop it again
After which neo4j-admin dump worked.
Credit for the solution to #folterj's last answer on this thread.
For me I was using different neo4j versions for creating (4.4.0) and dumping (4.2.6) the database
Related
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?
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
I had a similar problem and had to first drop the database DROP DATABASE neo4j then create a new database CREATE DATABASE neo4j.
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 load to 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.
I'm new to neo4j.
I have created a new graph/database named db-learning. I'm able to connect and perform some operations on the database via neo4j browser. No issue at all.
However when I tried to dump it using neo4j-admin dump --database "db-learning" --to "/some/path" I get this error saying database not found.
Database does not exist: db-learning
Am I missing something?
Sorry if that's confusing. The database name in the project is not related to the underlying database name (which is neo4j for the default database)
So if you open the terminal, this should be good enough:
./bin/neo4j-admin dump --database "neo4j" --to "/tmp/test.dump"
I think you can also leave off the default database name.
Getting the same issue when neo4j is in fact an existing DB. I don't know how the N4J team managed to overcomplicate this so much but this whole process is such a nightmare.
The Aura service only accepts .dump files, which have to be generated via neo4j-admin. This won't allow remote DBs so you have to pull down a neo4j directory (for instance, from a graphenedb.com dump), load it locally, then export that via neo4j-admin -> dump file in order to upload and import into a Aura instance.
Has anyone at Neo4j actually used their own software?
I'm trying to remotely back up my Neo4J database for already 2 days and nothing works.
I run
sudo neo4j-admin backup --backup-dir=backup --name=graph.db-backup --from=1.1.1.1:1111 --timeout=50m
The files start to get saved and then simply erased after a while and there's no backup.
I tried setting up --pagecache=16M and HEAP_SIZE but it has no effect. Sometime it just stalls sometimes I get an error like this:
unexpected error: java.io.IOException: org.neo4j.com.ComException: Channel has been closed
The DB I'm backing up is Enterprise 3.3.3 and the one I'm backing up with is 3.5.14
Thank you for any help.
Is this the normal Neo4J behavior?
I unpacked the tar file of Neo4j linux version.
When running the server (./bin start) it seems like the server is up, but I cant access the browser (although I get a message it is ready).
Running the console (./bin console) - returns an error: "Error: Could not find or load main class org.neo4j.server.CommunityEntryPoint"
Did anyone also encountered this issue? How can I solve this?
Thank you
How did you run ./bin console? I'm curious since such a thing does not exist.
To start up the database you use bin/neo4j start - then you point your browser to localhost:7474.
For command line based access use bin/neo4j-shell.
I just upgraded my Neo4J from 1.9.4 to 2.0.1 newest stable release.
The upgrade instructions say that you can just start the new Neo4J with the old database provided that
allow_store_upgrade=true
which is exactly what I did.
However, when I copied my old graph.db folder (which contains all data) into the data folder of the new installation and tried to run neo4j for the first time, it didn't work. The error message I got in terminal upon neo4j start was
Using additional JVM arguments: -server -XX:+DisableExplicitGC -
Dorg.neo4j.server.properties=conf/neo4j-server.properties -
Djava.util.logging.config.file=conf/logging.properties -
Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -
XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [462]... waiting for server to be ready... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
When I removed the graph.db folder from the new installation and ran neo4j start once again, it all started fine, but with a new clean database, of course.
FIY I run it on Mac OS X 10.9, the newest Java 1.7.0_51-b13 SDK installed.
Does anybody know what I did wrong? Thank you!
Ok, I found a solution. The upgrade instructions say that you should uncomment this string in conf/neo4j.properties:
#allow_store_upgrade=true
But what they don't say is that you should uncomment is in the OLD database BEFORE you shut it down the one last time in the old version.
Then, when you install the new database, just copy the graph.db folder into the /data folder of the new 2.0.1 Neo4J, then, before launching it, go to /conf folder of the NEW database, find that same neo4j.properties file, UNCOMMENT that same line:
allow_store_upgrade=true
Then launch the new 2.0.1 Neo4J database for the first time, make sure the data is all fine.
Don't forget to then comment that option once you shut down the database.
A bit of a complicated way to update, would be great if Neo4J provided a better and more streamlined way to do that...