Reputation: 21
the ultimate aim is to do a full backup from one of the database, so i tried to connect to the database by shell and execute a query returns with everything. here is the issue :
/opt/data/core01/bin/neo4j-shell -path /opt/data/core01/data/databases -config /opt/data/core01/conf/neo4j.conf
NOTE: Local Neo4j graph database service at '/opt/data/core01/data/databases'
Welcome to the Neo4j Shell! Enter 'help' for a list of commands. Please note that neo4j-shell is deprecated and to be replaced by cypher-shell.
neo4j-sh (?)$ MATCH (n) RETURN n;
0 row
291 ms
neo4j-sh (?)$
ls -l /opt/data/core01/data/databases
total 144
drwx------. 2 root root 39 Oct 19 09:36 certificates
drwx------. 7 root root 4096 Oct 19 09:36 graph.db
i tried to add the graph.db to the path, but did not work.
/opt/data/core01/bin/neo4j-shell -path /opt/data/core01/data/databases/graph.db -config /opt/data/core01/conf/neo4j.conf
Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /opt/data/core01/data/databases/graph.db
i tried to connect to the server on a specific port :
[root@tnv-it-lora0002 core01]# /opt/data/core01/bin/neo4j-shell -v localhost -port 7474 -config /opt/data/core01/conf/neo4j.conf
non-JRMP server at remote endpoint
i'm very new to this, so i appreciate any kind of help.
thanks
Upvotes: 1
Views: 1212
Reputation: 21
add these lines to the conf file :
# Enable a remote shell server which Neo4j Shell clients can log in to.
dbms.shell.enabled=true
# The network interface IP the shell will listen on (use 0.0.0.0 for all
interfaces).
dbms.shell.host=127.0.0.1
dbms.shell.host=127.0.0.1
# The port the shell will listen on, default is 1337.
dbms.shell.port=1337
/opt/data/core01/bin/neo4j-shell -v localhost -port 1337 -config /opt/data/core01/conf/neo4j.conf
export from shell :
cat /opt/data/core01/bin/export_statment.cql | ./opt/data/core01/bin/neo4j-shell -v localhost -port 1337 -config /opt/data/core01/conf/neo4j.conf
or
/opt/data/core01/bin/neo4j-shell -v localhost -port 1337 -config /opt/data/core01/conf/neo4j.conf -file /opt/data/core01/bin/export.par
Upvotes: 1