4

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!

Aerodynamika
  • 7,883
  • 16
  • 78
  • 137

1 Answers1

7

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

Aerodynamika
  • 7,883
  • 16
  • 78
  • 137
  • 1
    Actually it should be enough to enable it for the new database. Are you sure that your old database was cleanly shut down? You can always check the logs in data/graph.db/messages.log and data/logs/* – Michael Hunger Feb 08 '14 at 18:12
  • 1
    @MichaelHunger Yes, it was cleanly shut down and it didn't work at first... I assume that a clean shut down is when I use neo4j stop to end operation of the database while there are no transactions happening? Or is it something else? – Aerodynamika Feb 08 '14 at 19:30
  • 1
    Thank you! This worked perfectly on Ubuntu 13, I had been looking for an answer but Neo4j wasn't clear enough with their instructions. I really appreciate this, good job. (I also had done it for both and had done a clean exit) – AngelloMaggio Mar 20 '14 at 17:43
  • 1
    SWEET JESUS. I've been looking for this solution for hours. Thank's so much for figuring this out! – adam Jun 20 '14 at 22:14
  • 1
    This procedure works for 1.9 to 2.0 but NOT 1.9 to 2.1 directly. I don't understand why neo distributes example databases (http://www.neo4j.org/develop/example_data) which are unusable out of the box with the latest two version (wouldn't a single cypher file or something be much more portable?). – user3243135 Jun 23 '14 at 22:35