Importing a .dump file into GrapheneDB instance
GrapheneDB currently doesn't allow for direct import of .dump files into a GrapheneDB instance. We get many requests on migrating from Neo4j Aura into GrapheneDB, where .dump file needs to be imported.
Here’s a workaround for what to do in this case. You'll need to load the dump locally using the Neo4j-admin tool (which comes with Neo4j Desktop) and then restore the compressed folder to your GrapheneDB instance.
Installing Neo4j Desktop and creating a DBMS
First step is to download and install Neo4j Desktop if you haven’t already. Once successfully installed, please create a DBMS in your Neo4j Desktop. On the Project tab, click on +Add > Local DBMS, to create a new DBMS.
Next, name your database, add a password and select your preferred version. Make sure your version is compatible with your .dump file. Click on Create button.
Once it's created, select your DBMS and you’ll see the Start button. Click on it.
When the database is started, it populates both system and default(neo4j) databases, and you can open the Neo4j Browser by navigating to Open button, to check the contents of the database (it's usually empty).
Loading file into the DBMS
Now, please click on the Stop button, and stop the database. Then navigate to +Add and select File to add the .dump file from Neo4j Aura.
If successful, you’ll find the .dump file under the File section. Now it's time that you start the database by selecting it and clicking on a Start button. Navigate to the .dump file you've loaded and click on the three dots on the right-hand side to open the options to either create a new DBMS with the dump or import it into an existing one.
Proceed to choose the database you want to load to (for example if you chose import to an existing DBMS), give it a name, then click on the Create button. Please make sure that you see the green active tag next to your selected database before hitting the create button.
If successful, you’ll find the new database created and added to your list. Clicking on it should show you its contents on the right-hand side. You can also decide to open in the Neo4j Browser and check to see if the data corresponds to what you have in Neo4j Aura.
Locating and compressing the folder
To locate the folder where this new instance is stored, follow these steps, please click on the three dots next to your DBMS > Open folder > DBMS. That opens the data folder location. You can copy the data folder to a more convenient location like Desktop, then compress the file to any of the accepted formats for importing into GrapheneDB. Supported formats are: zip, tar, cpio, gz, bz2 and xz.
Restore the compressed folder into GrapheneDB instance
Now you're all set to import the folder into your GrapheneDB instance. With few simple steps you'll be all set.
Make sure that the database is stopped in Neo4j Desktop and then follow the instructions to upload the file that you can find in this article.
Updated 8 months ago