Neo4j Desktop: Databases getting overwritten automatically after update installation - neo4j

I am using Neo4j Desktop version (1.3.6) with Neo4j server version (4.1.1) on my Windows machine. I had few databases/graphs created which I'd been working on lately.
Yesterday, I got a Neo4j Desktop update notification which I let install on my machine.
Now, after restart, all my databases have been over written by the Neo4j default Movies Database sample nodes/relationships. All my data is lost and I don't know how to revert or recover.
Furthermore: any new database that I create and start, while browsing it using Neo4J desktop browser and issuing first CQL i.e. MATCH(n) RETURN n, I again see Movies database data automatically replicated into my newly created database.
How do I revert or recover my overwritten data?

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.

Installing Neo4j Community Server V4.0.1 on macOS

Can I have two versions of the Neo4j Community Server database (V3.5 and V4.0.1) installed in macOS? I'd like to continue working with the V3.5 database for my current project, begin testing V4.0.1, migrate the current database to V4.0.1, and use V4.0.1 for my new project. Has anyone tried this?
Perhaps a good strategy would be to use separate Docker containers.
If you want to use the same data set, you might try grabbing the Neo4j 3.5 container from Docker Hub and following the migration path (https://neo4j.com/docs/operations-manual/current/upgrade/) to test out the actual migration and continue working with your data from 3.
You could also, of course, grab the Neo4j 4.0 container from Docker Hub and start playing around with new data if you just want to test out features.

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.

Gremlin on Neo4j 2.2.7

I need to incorporate the possibility of sending Gremlin scripts to my Neo4j 2.2.7 DB so I tried to install the thinkaurelius neo4j plugin by using one of the prebuilt releases.
Unfortunately I guess those releases were built for older Neo4j versions (2.1.6) and, as a result, I got this error when I tried to start Neo4j from my Windows machine with Java 8:
Starting Neo4j Server failed: javax.servlet.ServletException: org.neo4j.server.web.NeoServletContainer-e1dd969#ae4c07fc==org.neo4j.server.web.‌​NeoServletContainer,-1,false
To experiment a bit with the Gremlin language I tried to connect to my DB from the gremlin console (the DB wasn't used by any other process) but, when I run graph = Neo4jGraph.open('<path to my db>') the console stopped responding (there was no new prompt appearing).
Does anybody know what I could do to run some Gremlin script on my database?

Resources