cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Move databases to new Win PC

Hi,

I just got a new Windows laptop and want to move my Neo4j Desktop databases to the new environment. Everything is upgraded to current version

I have installed Neo4j on the new machine, and I have tried to dump/load the neo4j database.
Old laptop:

bin/neo4j-admin dump --database=neo4j --to=/dumps/neo4j/neo4j-.dump

New laptop:
bin/neo4j-admin load --from=/dumps/neo4j/neo4j-.dump --database=neo4j --force

neo4j-admin load responds as expected, but when restarting Neo4j Desktop none of the databases I loaded is listed.

What I want to do is to move all databases from my old laptop to my new one. What is the best approach???

Regards, Bent

1 ACCEPTED SOLUTION

Hi, I finally figured it out!

On my old machine I used terminal in my "JSV" DBMSS and executed:

bin\neo4j-admin dump --database=neo4j --to=c:\backup\JSV.dump

copied the dump file to my new machine. Created a database called "JSV" then used terminal in this dbmss and executed:

bin\neo4j-admin load --from=c:/backup/JSV.dump --database=neo4j --force

When I started my "JSV" database everything worked

It took some time to undestand that the database is always named neo4j

You mention there was functionality in the desktop for this - could that be the Clone function you where refering to? It WOULD be great to have theese commands in the GUI though-

Regards,
Bent

View solution in original post

13 REPLIES 13

In the brand new Neo4j Desktop you can try to export the database from the UI once your start your DBMS you will have the option to dump each individual database.

Hi, thanks for the reply.

I find no such option in Neo4j Desktop 1.4.4, could you be more specific on how to do this?
A short click-by-click instruction would be very helpful as I have not been able to google to a solution that actually works

Regards,
Bent

It's not intuitive at all but you must actually start the DBMS with the green start button in Neo4j Desktop 1.4.4 before you can see each individual database in it and press the 3 dots at their very right button the see the dump function.

Sorry I don't have my main computer right now so I can't provide a screenshot.

Hi, I finally figured it out!

On my old machine I used terminal in my "JSV" DBMSS and executed:

bin\neo4j-admin dump --database=neo4j --to=c:\backup\JSV.dump

copied the dump file to my new machine. Created a database called "JSV" then used terminal in this dbmss and executed:

bin\neo4j-admin load --from=c:/backup/JSV.dump --database=neo4j --force

When I started my "JSV" database everything worked

It took some time to undestand that the database is always named neo4j

You mention there was functionality in the desktop for this - could that be the Clone function you where refering to? It WOULD be great to have theese commands in the GUI though-

Regards,
Bent

Change this:
bin\neo4j-admin load --from=c:/backup/JSV.dump --database=neo4j --force

to
bin\neo4j-admin load --from=c:/backup/JSV.dump --database=JSV --force

There is a section at the bottom called 'File' and you can drag and drop your .dump file. Once the file is dropped, you can click on three ellipses and that opens up options to import data. The only draw back is that it creates a database named 'neo4j'. Using the terminal and running the above Cypher gives much better control.

Hi, that will not work; the database is allways called neo4j to my understanding.
The procedure I described worked for several databases, I just named the dump-files similar to my DBMSS to keep track.

Regards,
Bent

neo4j is the default database. You can add multiple databases with different names. When you open the db in neo4j browser by default you will see neo4j db. Click on db icon at left, click on the db dropdown to see/select different databases that you created. To test this, run the above cypher in terminal to see the JSV database in the db drop down.

HI bent,

I am dumping/loading the file from Neo4j desktop as well. I think your process is very helpful, and it seems to be successful to me . I already export a dump named'neo4j.dump'


However, I could not find any nodes in the new database I created 'load'. Do you know in wihch step that I have made mistakes? Cheers

Hi, when you create an empty DMSS you will need to load the xxx.dump file to the neoj database and overwrite this.

  1. Create a dbmss (don't start it)
  2. open terminal in this dbmss and load dumpfile to neo4j database with --force

Hi, I just got confirmation that the "Dump" button is not present in the Windows edition, but is available for Mac/OSX!

Regards,
Bent

What ? Something available for Linux but not for windows, well that's funny it's so rare lol.
But in the case of a DBMS I can easily understand why.

Thanks for the tip @bent.s.lund I didn't know, I got rid of Windows years ago.

mbandor
Graph Voyager

I'm looking at a similar issue and think I'm not doing something correctly. When I execute the command:

bin/neo4j-admin dump --database=neo4j --to=/dumps/neo4j/test.dump

I get an error stating 'bin' is not recognized as an internal or external command, operable program, or batch file. Is there a configuration option that didn't get set during installation?

Hi,

I believe you need to put a / before bin

If you are on Windows use \ and full path to the dump file location

Regards

Bent S Lund