Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error moving Neo4J database when upgrading from 1.9.4 to 2.0.1

Tags:

neo4j

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!

like image 277
Aerodynamika Avatar asked Mar 20 '23 15:03

Aerodynamika


1 Answers

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

like image 76
Aerodynamika Avatar answered May 03 '23 19:05

Aerodynamika