Migrate neo4j.dump from AuraDB 4 to be used on Neo4j Desktop db 5

Greetings,

I am using AuraDB Professional version 4. I am trying to migrate our exported neo4j.dump file into a Neo4j 5 (.13 or greater, the latest .24 would be best, something that allows for working with vector embedding queries) using Neo4j Desktop. I do not want to follow this process...

which leads to

...because again I'm using AuraDB Professional AND I do not want to create new AuraDB instances ($$$) on our account. I simply want to work with the 4 version neo4j.dump in Neo4j Desktop 5.

I have tried a number of different 'load' 'migrate' 'copy' queries from the terminal commands which point to my Neo4j Desktop 5.24.0 database, but nothing seems to be working.

There does not appear to be a simple soup to nuts/practical/pragmatic, explanation/demonstration of how to do this. If there is, please point me to it.

Many Thanks,

ka

1 Like

@kave

Odd in that

I have tried a number of different 'load' 'migrate' 'copy' queries from the terminal commands which point to my Neo4j Desktop 5.24.0 database

and specifically migrate and copy did not work ?

Did you run neo4j-admin database copy and or neo4j-admin database migrate from the path where 5.24.x was installed? Documentation at Migrate your databases - Upgrade and Migration Guide indicates these are 2 ways to move from a v4x to v5x database?

What was the result of the command (i.e. migrate or copy)?
What was the result when attempting to then start with Neo4j v5x ?

Thanks so much for your quick response Dana. Here's what I'm doing...

From the page you cited Migrate your databases - Upgrade and Migration Guide Restore the database on Neo4j 5 Step 1.

I have a neo4j.dump file that has been exported from my AuraDB 4 Snapshots. A .dump file seems to be the only format I can export from AuraDB 4.

In my Neo4j Desktop, I have created a new Graph DBMS of 5.24.0 and having clicked the + Add button, I have added this neo4j.dump file to this project (though there seems to be some issue around its placement in this dir). Assuming the dir of the added neo4j.dump file is correct, I open a terminal for this Graph DBMS and run the Step 1 cmd:

bin\neo4j-admin database restore neo4j --from-path=neo4j.dump

This returns an error saying the Path 'C:\Users\user.Neo4jDesktop\relate-data\dbmss\dbms-abc-123\neo4j.dump' does not exist. So out of the gate I have to figure out where Desktop would prefer I put this file for restore.

I copied the neo4j.dump file and put it in the root dir for dbms-abc-123 and ran the cmd again. This time I get the error of --from-path option should contain only backup artifact files (ending with '.backup').

I don't know how to get AuraDB 4 to export a snapshot as a .backup file and the documentation seen here Backup your databases - Upgrade and Migration Guide doesn't show how I would create a .backup file from AuraDB 4. The documentation on this page uses cmd line and I don't know how to run cmd line against an AuraDB instance either in the AuraDB admin or from Neo4j Desktop.

@kave
Part of the issue and as described at Backup and restore - Operations Manual is that one can create either a online Database Backup or a offline Database Dump through neo4j-admin backup and neo4j-admin dump ( v4.4x syntax) and then one needs to run the converse to either Restore ( neo4j-admin database restore ) or Load ( neo4j-admin database load) respectively and in v5x syntax.

Given you have a .dump file you would need to run neo4j-admin database load similar to

bin\neo4j-admin database load --from-path=c:\dumps\ neo4j --overwrite-destination=true

and with the neo4j.dump located in c:\dumps.

Once loaded you will then need to run neo4j-admin database migrate

Thanks for sticking with me Dana! I've 'successfully migrated' 4.4.0 to 5.24. I do have a follow up question regarding --force-btree-indexes.

Here's what I've done for posterity...

With a .dump file from AuraDB 4.4, added it to + Add file in Neo45j Desktop
Created new 4.4.0 database in Desktop
Created new dir backups in root of above db
Started db so is active
Ran this cmd> bin\neo4j-admin backup --database=neo4j --backup-dir=backups --include-metadata=all
Backup complete successful, resulted in full set of files named neo4j in backups dir

In Desktop, created new local database 5.24.0. I did not start this db.
Copied the 4.4 neo4j dir and pasted it in the new 5.24.0 import dir.
Opened a terminal for 5.24 and ran this cmd> bin\neo4j-admin database restore neo4j --from-path=import/neo4j. This is the tail end of the cmd response...

2025-05-21 17:05:21.902+0000 INFO  [c.n.b.r.RestoreDatabaseExecutor] Restoring of files completed
2025-05-21 17:05:21.914+0000 INFO  [c.n.b.r.RestoreDatabaseExecutor] Start recovering database 'neo4j'.
2025-05-21 17:05:21.982+0000 INFO  [c.n.b.r.RestoreDatabaseExecutor] Finish recovering database 'neo4j', took 67ms.
The restored database[null] is not on a supported version (current format: AF4.3.0 introduced in 4.3.0). Use the 'neo4j-admin database migrate' command.
Restore of database 'null' from path=`RestoreSource{sourceDirectory=C:\Users\user\.Neo4jDesktop\relate-data\dbmss\dbms-594ebd6e-0197-4076-ba94-8d5032793e1f\import\neo4j, databaseName='neo4j', type=Legacy}` completed successfully.
You need to execute C:\Users\user\.Neo4jDesktop\relate-data\dbmss\dbms-594ebd6e-0197-4076-ba94-8d5032793e1f\data\scripts\neo4j\restore_metadata.cypher. To execute the file use cypher-shell command with parameter `null`

In the above it says 'completed successfully' and that I need to run the migrate cmd.
So I ran the migrate cmd> bin\neo4j-admin database migrate neo4j --verbose, but within the verbose response it returned this failed to migrate message citing that my BTREE indexes didn't have valid replacements, but that I could choose to --force-btree-indexes-to-range...

Alternatively, you can use the option --force-btree-indexes-to-range to force all BTREE indexes or constraints backed by BTREE indexes to be replaced by RANGE equivalents. Be aware that RANGE indexes are not always the optimal replacement of BTREEs and performance may be affected while the new indexes are populated. See the Neo4j v5 migration guide online for more information.

I reran the cmd with --force...> bin\neo4j-admin database migrate neo4j --verbose --force-btree-indexes-to-range, and migration was successful.

Follow Up Question on -force-btree-indexes
Now that I have my 5.24 database active and running in Desktop with all expected data, can I simply drop any current indexes/constraints and re-add them?

@kave
thanks for the update.
But the neo4j.dump was it then neo4j-admin load .... into the Desktop database running Neo4j 4.4?

As to

Follow Up Question on -force-btree-indexes
Now that I have my 5.24 database active and running in Desktop with all expected data, can I simply drop any current indexes/constraints and re-add them?

but why drop and then re-add?

The neo4j.dump file came from AuraDB running 4.4.0... I think I see where you're coming from now. I could have used neo4j-admin load to load a .dump file into 5.24. I was under the impression that I could only bring 4.4 data into a v5 environment by way of neo4j-admin backup and neo4j-admin restore. I followed the backup and restore route.

RE: indexes/constraints, I thought that the documentation I read from here...

...stated running --force-btree was not advised, so I wasn't sure if I needed to set up 'range' indexes/constraints to replace the old btree.

During database migration, it is possible to force Neo4j 5 to drop all BTREE indexes and replace them with RANGE indexes using the option --force-btree-indexes-to-range of the neo4j-admin database migrate command. However, this is not advised because RANGE indexes are not always the optimal replacement, and performance will be impaired on start-up while the new indexes are populated.