Getting started

Importing a .dump file

GrapheneDB currently doesn’t allow for direct import of .dump files into a GrapheneDB instance. We get many requests on migrating from Neo4j Aura for example, where .dump file needs to be imported. You have few options to approach this. You can load the dump locally using the Neo4j admin tool, or use Neo4j Desktop locally, and then import the compressed folder to your GrapheneDB instance that has the same Neo4j version.

Using Neo4j admin tool

Installing Neo4j admin tool

Firsly make sure that you have Neo4j admin tool installed. You can find official documentation around it in Neo4j docs. Please make sure that the version of Neo4j admin tool corresponds to the Neo4j version your database is using.

Creating a local Neo4j instance from .dump file

Next thing is to create a local Neo4j instance from a .dump file. Please check the example commands below to see how to achieve this.

  1. Stop the Neo4j service to avoid conflicts during the restoration process.

    sudo systemctl stop neo4j
  2. If this is not the first time you are using Neo4j admin tool, clean the existing data directory to ensure there are no conflicts with the new database.

    sudo rm -rf /var/lib/neo4j/data/databases/neo4j
    sudo rm -rf /var/lib/neo4j/data/transactions/neo4j
  3. Use the neo4j-admin tool to load the .dump file. Replace path/to/your/dumpfile.dump with the actual path to your dump file.

    sudo neo4j-admin load --from=path/to/your/dumpfile.dump --database=neo4j --force

    The --force flag overwrites the existing database if it exists.

  4. After restoring the database, start the Neo4j service.

    sudo systemctl start neo4j
  5. Check the Neo4j logs to ensure the service started correctly and the database was restored without issues.

    sudo tail -n 50 /var/log/neo4j/neo4j.log
    sudo tail -n 50 /var/log/neo4j/debug.log

Locating and compressing the folder

  1. First, stop the Neo4j service.

    sudo systemctl stop neo4j
  2. Locate the /data folder. The /data folder is typically located in the Neo4j installation directory. The default path is /var/lib/neo4j/data. You can confirm this by checking the Neo4j configuration file.

    sudo nano /etc/neo4j/neo4j.conf

    Look for the line that specifies dbms.directories.data. If it’s not set, the default is /var/lib/neo4j/data.

  3. Once you have located the /data folder, you can compress it using the tar command.

    sudo tar -czvf neo4j-data-backup.tar.gz -C /var/lib/neo4j data

    This will create a compressed file named neo4j_data_backup.tar.gz in your current directory.

Import the compressed folder into GrapheneDB instance

Now you’re all set to import the folder into your GrapheneDB instance. Locate your GrapheneDB instance, navigate to the Management Launcher, and from the drop-down menu, select Import.

import-data-dbms

A new screen will appear, which will ask you to select a file that you want uploaded. Please select a compressed file and click on Confirm button.

confirm

⚠️ Important

  • Please make sure to stop your local database before compressing the data folder.
  • Compress the local /data folder.
  • Make sure your dataset is smaller than your plan’s disk.
  • Make sure the imported dataset minor version is the same as your database on GrapheneDB.
  • The current database will be replaced with the file you select to be imported.
  • Upload the compressed file.
  • If the system db is present in the import file, the credentials of the system db that you had locally should work on your GrapheneDB database after the import.

The Neo4j instance will be stopped, the store files replaced, and then Neo4j will be started up again. To track the progress of the import operation, please navigate to the Operations tab of your database interface.

operation-dbms

Verifying the data is properly imported

Please navigate to the Connect tab of your database interface, launch a Neo4j Browser and verify the data is there. If the system db is present in the import file, the credentials of the system db that you had locally should work on your GrapheneDB database after the import.

connect-dbms

Using Neo4j Desktop

Installing Neo4j Desktop and creating a Project

The first step is to download and install Neo4j Desktop if you haven’t already. Once successfully installed, on the Project tab, create a new Project.

new-project

Loading a dump file and creating a DBMS from it

Now, please click on +Add button > choose File from the drop-down menu, to add the dump file from Neo4j Aura.

add-file

If successful, you’ll find the .dump file under the File section.

Navigate to the dump file you’ve loaded and click on the three dots on the right-hand side to open the options > select Create new DBMS from dump.

new-dbms-from-dump

Name your database, add a password, and select your Neo4j version. Make sure your version is compatible with your .dump file. Click on Create button.

dbms-info

Once it’s created, select your DBMS and you’ll see the Start button. Click on it.

dmbs-start

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 new database, neo4j database should contain the data from the dump file.

Locating and compressing the folder

Now, please Stop the local database and locate the folder where this new instance is stored. Click on the three dots next to your DBMS > Open folder > DBMS.

open-data

That opens the data folder location.

data-folder-dbms

You can copy the data folder to a more convenient location like a 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.

Import the compressed folder into GrapheneDB instance

Now you’re all set to import the folder into your GrapheneDB instance. Locate your GrapheneDB instance, navigate to the Management Launcher, and from the drop-down menu, select Import.

import-data-dbms

A new screen will appear, which will ask you to select a file that you want uploaded. Please select a compressed file and click on Confirm button.

confirm

⚠️ Important

  • Please make sure to stop your local database before compressing the data folder.
  • Compress the local /data folder.
  • Make sure your dataset is smaller than your plan’s disk.
  • Make sure the imported dataset minor version is the same as your database on GrapheneDB.
  • The current database will be replaced with the file you select to be imported.
  • Upload the compressed file.
  • If the system db is present in the import file, the credentials of the system db that you had locally should work on your GrapheneDB database after the import.

The Neo4j instance will be stopped, the store files replaced, and then Neo4j will be started up again. To track the progress of the import operation, please navigate to the Operations tab of your database interface.

operation-dbms

Verifying the data is properly imported

Please navigate to the Connect tab of your database interface, launch a Neo4j Browser and verify the data is there. If the system db is present in the import file, the credentials of the system db that you had locally should work on your GrapheneDB database after the import.

connect-dbms

Try out today and get $50 in CreditsTry out today and get $50
Check
Evaluate for free
Check
Pay as you go
Check
No hidden costs