Upgrade Neo4j Database V2.x to V5.x

Hello everyone,

I am new to using Neo4j and will be implementing it at my new workplace. However, I've noticed that the current database in use has not been updated since its inception, and it's currently running on an outdated version of Neo4j (version 2.3.12). I would like to upgrade it to the latest version. Can anyone provide suggestions on how I can accomplish this and confirm if it's possible?

Thank you.

What has worked for me (although my migration was from V4.x to V5.x) was to export the old version and then import the data into a new V5.x database. So far, at least for me, the V5.9 database seems to be the most stable.

Thanks! Though I'm a bit worried about the significant differences in the framework and storage system between V2.x and V5.x.

@Dusty

2.3.12 your starting point Neo4j 2.3.12 - Graph Database & Analytics was released December 2016. So we now 6+ yrs in.
Besides the other concerns an upgrade to Neo4j v5 is going to require Java 17 whereas I think 2.3.12 required Java 8.
So yeah a number of big changes.

1 Like

@dana_canzano
Yes, it is true that version 2.3.12 required Java 8.
Do you have any recommendations on how to proceed with this task?

Is it possible to upgrade directly to version 5.x or do I need to first upgrade to a lower version, such as 3.x or 4.x, before upgrading to 5.x?

@Dusty
Can you do it? YES.
But given your current Neo4j version is so old, i.e 6+ yrs, you need to read the documentation somewhat bacwards.
For example the v5 upgrade guide at Neo4j v5 upgrade and migration - Upgrade and Migration Guide states

If you are using Neo4j v4.4, you can migrate your databases to Neo4j v5 by following the instructions in Migrate from v4.4.

Otherwise, you must first migrate your databases to Neo4j v4.4 by following the instructions in the Neo4j v4 specific section.

so to get to V5 you must be at v4.4.x

And then we need to figure out how to get to v4.4.x to which

Supported upgrade and migration paths in 4.x - Upgrade and Migration Guide indicates

Direct migration path (Neo4j 3.5 only)
The direct migration path (3.5 → 4.x) makes use of the neo4j-admin copy command to migrate the store_format of a single 3.5 database. Because, the command does not copy the schema store, the intermediary steps of the sequential path are not needed. If a schema is defined, you have to recreate it by running the commands that the neo4j-admin copy operation outputs.

This path is suitable if you want to migrate a 3.5 Neo4j DBMS (Community or Enterprise) to 4.x Enterprise because the 3.5 DBMS contains just a single database.

so now we know how to upgrade from 3.5.x to 4.x ( namely 4.4.x)

But then we need to know how to get to 3.5.x to which

indicates

Supported upgrade paths
The following upgrade paths are supported:

3.3.latest → 3.5.35

3.4.latest → 3.5.35

3.5.any → 3.5.35

and once again we need to know how to upgrade to 3.3.x

and to which 5.1. Upgrade planning - Chapter 5. Upgrade

indicate

5.1.1. Supported upgrade paths
The following Neo4j upgrade paths are supported:

2.3.latest → 3.3.9
3.0.latest → 3.3.9
3.1.latest → 3.3.9
3.2.latest → 3.3.9
3.3.any → 3.3.9

and so now we know the path to upgrade.  i.e read this post from bottom up and follow said doc links.   

Its going to be work ( again partly because 2.3.x is some 6+ yrs old) but it can be done


@dana_canzano Thanks for your help! I'll look into this, and it's definitely going to take some work.