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.

Importing a neo4j database in community edition

Hi there, would be very grateful if anyone can help with the following:

I'm running neo4j-community-4.0.3 in order to analyze an online database that can be downloaded as a neo4j directory (https://reactome.org/download/current/reactome.graphdb.tgz). I call it a neo4j directory because it includes files with all the same names (neostore...., store_lock, database_lock) as the default neo4j database that is created when I first start neo4j.

The problem is that I am unable to load and query this database. In the documentation, I see commands to load csv files into the default database (neo4j) but how to load an existing database like the one referenced above? Here's what I have tried:

  1. delete neo4j and rename graph.db (the downloaded database) to be neo4j. The result is that when I run cypher-shell, I get the error
    "Database 'neo4j' is unavailable."

  2. copy-paste the contents of graph.db (the downloaded database) into the neo4j folder, replacing all files with the same name, while leaving the rest. Now when running cypher-shell I get the error
    "Unable to get a routing table for database 'neo4j' because this database is unavailable"

  3. Changing the default database in the neo4j.conf file, changing "dbms.default_database=neo4j" to "dbms.default_database=graph.db". This has no apparent effect, the default database remains neo4j, as seen here from within the cypher-shell

    neo4j@neo4j> :use system
    neo4j@system> show databases ;
    +------------------------------------------------------------------------------------------------+
    | name | address | role | requestedStatus | currentStatus | error | default |
    +------------------------------------------------------------------------------------------------+
    | "neo4j" | "localhost:7687" | "standalone" | "online" | "online" | "" | TRUE |
    | "system" | "localhost:7687" | "standalone" | "online" | "online" | "" | FALSE |
    +------------------------------------------------------------------------------------------------+

  4. a natural thing would be to add graph.db as a new database. I tried doing so in cypher-shell but this functionality is apparently not included in the community edition:

    neo4j@system> create database graph.db;
    Unsupported administration command: create database graph.db;

What else can I do? Any guidance would be much appreciated. Thank you in advance.

4 REPLIES 4

anthapu
Graph Fellow

Is the graph.db is 4.0 database or older version?

If it is 4.0 version try these steps.

  1. Delete all the files/dirs in databases and transactions directories.
  2. Unzip the db into databases directory.
  3. Update the neo4j.conf and change the default database name to the database name.
  4. Start server and check

In 4.0 the some config values are saved into System.db during first time and stay same.

I don't know the version of the graph.db file -- how do I check?

But I followed your steps and now when I start cypher-shell I get the error "The client is unauthorized due to authentication failure." Could it be because the database folder contained the system database?

Thank you for getting back to me!

From the reactome.org github site it seems it is older than 4.0. Can you download 3.5.14 Neo4J server and unzip the data to databases directory and start the server?

There is no system database in that version.

Hi anthapu, thank you, I followed your suggestion and was able to start the server but searching through the cypher-shell 3.5 documentation, I haven't yet been able to find a simple command to verify that the database is accessible, like the "show databases" command for version 4. Are you able to suggest commands to check that the database is working? I'm a n00b so still unclear on how to print out information about what's in the database.