working with neo4j - neo4j

Well i am working in gephi and there i have a plugin through which i have exported my graph to neo4j. Once exported it comes out to be folders in which there are some 10-12 files.
Now i have installed neo4j database in my system an running the server in
localhost:7474
It is displaying neo4j console .
Now my question is how to analyse my neo 4j folder which i have exported from gephi with the help of neo4j console Is this possible
Well i am probably new to this whole concept
Thanks

In your neo4j folder, you most certainly have a conf directory, with the file "neo4j-server.properties".
At the top you simply pu the path to your database :
# location of the database directory
org.neo4j.server.database.location=path/to/data.db
where data.db is a neo4j database directory.

Related

Neo4j Dump and Restore

Ubuntu 20.04 running multiple databases running with different version numbers in a project in Neo4j Desktop 1.2.7 and need to move them over to a newly installed machine with the latest version of Neo4j Desktop (not sure which version that is because on the SSD that's unplugged right now!).
Tried:
bin/neo4j-admin dump --database="MYDATABASENAME" --to=/dumps/MYDATABASENAME-.dump"
Which gives error "Database does not exist" error as I understand the default database is "neo4j" and that this somehow contains the other databases? Makes no sense to me.
Tried:
bin/neo4j-admin dump --database=neo4j --to=/dumps/DougiDatabases.dump"
...Thinking that the neo4j database may contain all the other databases and that did dump. but the file was only 5Mb or so, where my databases are a number of Gb, so clearly not correct.
In system database I do SHOW DATABASES and it shows me the neo4j and system databases, but nothing else.
I've seen some mention of a dump button in the three dots by a database in Neo4j Desktop, but I don't have that (regardless of DB running or not). I only have a clone option.
Previously I have copied the database files from the /home/MYNAME/.config/Neo4j Desktop/Application/neo4jDatabases folder and then updated the databases listed in the /home/MYNAME/.config/Neo4j Desktop/Application/persist/databases.json, but it seems that the folder structure in the latest version of Neo4j Desktop has a different structure, so I wasn't sure if I could still do this. Not tried.
Driving me mad. This should be so easy.
What do I do please?
I worked it out. For databases 3.x you need to use "graph.db" as the database name. For databases 4.x you always use "neo4j" as the database name.
e.g.
bin/neo4j-admin dump --database="graph.db" --to="/dumpsFolder/myDatabase.dump"
bin/neo4j-admin dump --database="neo4j" --to="/dumpsFolder/myDatabase.dump"
You need to to into the admin area for each database, launch the terminal and execute these commands. In the latest version of Neo4j Desktop you can then copy the dump files into the root of the project. e.g.
/home/USERNAME/.config/Neo4j Desktop/Application/projects/project-XXX
Then click the ... next to the dump name in Neo4j Desktop and "create from dump file" or similar. You select the database version, name it, set a password and continue. The database will restore.

Move Neo4j databases in Neo4j Desktop from one computer to another

I am upgrading my local machine from Ubuntu 16.04 to 20.04. I run Neo4j Desktop (version 1.2.7) on my 16.04 and have installed it on the 20.04 machine and want to move the databases over.
I'm sure that in the past I just copied and pasted the database folders in /home/dougi/.config/Neo4j Desktop/Application/neo4jDatabases from one computer to the other and started Neo4j Desktop. However, when I do that no database show in the project.
I tried doing a dump and load, but couldn't see how I would load the database into Neo4j Desktop on the 20.04 machine as you have to "create" a database for it to show in the project and the database version when creating is limited to 4.0.3 and all of my databases are earlier versions than that (I don't want upgrade them right now).
I tried creating a database, deleting the files in the folder created in /home/dougi/.config/Neo4j Desktop/Application/neo4jDatabases and pasting the database folder from the 16.04 machine into it (i.e. replacing the files it created). I just get a message saying that the database files have been moved or corrupted when I load Neo4j Desktop.
I tried running a load from a dump I had made and had an error saying WARNING: Max 1024 open files allowed, minimum of 40 000 recommended.. I did find some google articles on that, but this felt like a really messy way of doing the restore so I didn't go any further with that.
What is the easiest way to move Neo4j Desktop databases from one computer to another please?
Thank you!
OK, so the answer to this is that there is a file /home/dougi/.config/Neo4j Desktop/Application/persist/databases.json which contains the list of databases that display in Neo4j Desktop.
Create a new database to add an entry to the file and then copy and paste that entry, replacing the database ID and version with those of the new databases you are adding files for to create an entry for each of the databases.
Restart your computer and delete the temporary database you created.
Or you could just copy the file from your previous version of Neo4j Desktop, assuming there are no formatting changes between versions of Neo4j Desktop.

Non_exist relationships displayed in LInux Neo4j (version3.5)

HI i am using a aws ec2 to run a neo4j server. Before that I test in my local machine (Mac OS). everything works fine. But when I uploaded the same graph.db to ec2 and call db.schema(), there are some non-exists relationships. I acknowledge these relationships exist in my old graph.db. but I already deleted the whole graph.db file before load again. So I am wondering there are may be cached by neo4j? I run some queries for the relationships, there are do have some nodes show up. How can I fix this?
This is a long-standing issue that has was reported in version 3.2.2 and still apparently exists in 4.0.0.

How to perform a Neo4j database backup in Windows 10?

The neo4j documentation says that I gotta run some commands from the neo4j-admin tool, which is a terminal supposedly located in the bin folder, but I can't find that tool. there's also a cypher shell but when I open it as an administrator it shuts down immediately. Is there any other way of performing the backup? The neo4j version is 3.2.3.
I think that the simplest way to do a full database backup is coping the content of the data folder.
According the docs (file locations):
For /Windows zip installation the folder is <neo4j-home>\data
Using desktop installer the folder is %APPDATA%\Neo4j Community Edition

Migrate Neo4j data to GrapheneDB

So I’m ready to move my Neo4j database from my local machine to GrapheneDB for further development.
How can I move the data on my local machine to the GrapheneDB remote store?
I'm one of the founders at GrapheneDB.
Moving your data from your local machine to GrapheneDB is simple:
Stop your local instance: $ bin/neo4j stop
Put the contentes in a tarball or other type of compressed file (zip, gz): tar -cjf graph.tar.bz2 data/graph.db
Sign up or log in to GrapheneDB and create your database instance
Once the DB is created, navigate to the admin and use the restore feature to upload your compressed store files
Notes:
Neo4j should be stopped before copying your store files into a compressed file
You should restore into the same or a higher version on GrapheneDB, i.e. 2.0.X into 2.1.X or 2.1.6 into 2.1.6.
I hope this helps.
If you have any issues let us know. You can also contact our support once you've signed up through support UI or by emailing support at graphenedb dot com.

Resources