How to make Neo4J Enterprise backup work? - neo4j

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?

Related

Neo.TransientError.Database.DatabaseUnavailable | Database 'graph.db' is unavailable

I am trying to import the Hetionet into the Neo4j and I follow the guidiance below:
https://github.com/hetio/hetionet/tree/master/hetnet/neo4j
While using the command
curl --insecure --location https://github.com/hetio/hetionet/raw/master/hetnet/neo4j/hetionet-v1.0.db.tar.bz2 | tar --extract --bzip2
The error “curl: (23) Failure writing output to destination” has been thrown.
Therefore I just downloaded the file directly and moved to the directory ".Neo4jDesktop\relate-data\dbmss\dbms-0d0d3324-d1a6-4d3e-b82c-0c4451a8c880\data\databases"
After I started the database, It showed that this database is currently offline. When I trying to do some operations to it, the error "Neo.TransientError.Database.DatabaseUnavailable" has been shown.
Some valuable informations in the log file debug.log are as below:
2022-07-19 23:11:53.896+0000 ERROR [c.n.d.DbmsReconciler] Encountered error when attempting to reconcile database graph.db (request by SystemGraph:1) to state 'online', database remains in state 'offline'
org.neo4j.dbms.api.DatabaseManagementException: Unable to start database DatabaseId{7a8c6b65[graph.db]}
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.database.Database#3da82075' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown store version 'v0.A.7'".
The version of the dump you are trying to import is pretty old. From the readme
The database has been migrated to the Neo4j 3.0.1 Community Edition.
If you use a current 4.4 version of the database, the only thing you can do is to cascade through multiple versions and upgrade the store.
I am not yet sure if you really need each minor version to work properly.
Maybe it's already enough to go from 3.0 to 3.5 and follow this guide https://neo4j.com/docs/upgrade-migration-guide/current/migration/migrate-to-4.0/migrate-single-instance/
Otherwise starting 3.1-3.5 with allow_upgrade=true on the stores is the only option I see. There are Docker images available at
https://hub.docker.com/_/neo4j/ also for those older, unsupported versions.
Edit: You should be able to start/upgrade it with 3.3 and then again with 3.5 and then run a 4.4 neo4j-admin copy

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?
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.

InfluxDB influx-enterprise.key.json no such file or directory

I try to install InfluxDB Enterprise Edition using this documentation: https://docs.influxdata.com/enterprise/v1.2/production_installation/. The Requirements suggest to either use a license-key or license-path, where I do it with the License Key.
In Step 2, after installing, configuring and starting the Data Nodes I try to join the data nodes to the cluster. But executing influxd-ctl add-data enterprise-data-01:8088 gives me the error:
add-data: operation exited with error: open /tmp/influx-enterprise.key.json: no such file or directory
although I configured not to use the license-key json but rather the license-key.
I also have the json file, so I tried it with the license-path but still getting the same error. Has somebody else encountered the same issues?
EDIT
Issue has been resolved, I had to restart the Data nodes after I changed the configuration to use the license-path facepalm. I went into this problem as I previously entered an old license key.

Exception with running Neo4j version 3 communitiy edition

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.

Neo4j StartService FAILED 1053 after copying Beer DB example

I installed Neo4j as instructed in the site and was able to install and stat server. However I tried to copy the Beer example DB by stopping the server and deleting the current graph.db in the \data folder and replaced with the one Beer example downloaded from online (graph.db folder). This is the only step I did.
Now the issue is, when i tried to start the Server I get "StartService FAILED 1053"
I am using following command on the powershell in windows - c:\neo4j-community-2.0.0-M03> .\bat\Neo4j.bat start
Can someone please help if I have done anything wrong here.
Thank you!
You are running neo4j 2.0 against an older database file. You'll need to set the config parameter to allow the store to be upgraded before starting. See instructions here:
http://docs.neo4j.org/chunked/milestone/deployment-upgrading.html#_explicit_upgrade

Resources