Load dump file in docker container


I'm using neo4j 4.0.4.

I'm trying to load a dump file into a neo4j docker container. What I did was that I created a dump file by using the docker-admin dump command. Then I copied the file over to the docker container. And I tried to use docker-admin load after I bash into the docker container.

The load command was executed without any issue. Then I changed the owner to neo4j for the new database.

However, when I try to switch to the database, I got the Mismatching store id error. Stacktrace message attached.

The dump file was created from a neo4j instance on the host. In other words, not from a dockerized neo4j.

I've also tested loading the dump file from another non-dockerized neo4j server, and it worked. So there should be nothing wrong with the dump file.

Any ideas?

Thank you!

java.lang.RuntimeException: Mismatching store id. Store StoreId: StoreId{creationTime=1591224958474, randomId=-5037670428532410687, storeVersion=3471765337752883975, upgradeTime=1591224958474, upgradeTxId=1}. Transaction log StoreId: StoreId{creationTime=1590073351975, randomId=-7151515447851398600, storeVersion=3471765337752883975, upgradeTime=1590073351975, upgradeTxId=1}
at org.neo4j.kernel.recovery.Recovery.validateStoreId(Recovery.java:386)
at org.neo4j.kernel.database.Database.start(Database.java:377)
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:187)
at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:132)
at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64)
at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39)
at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124)
at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
at org.neo4j.server.database.CommunityGraphFactory.newDatabaseManagementService(CommunityGraphFactory.java:36)
at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)

Can you share the commands that you've used that don't work? I've been able to import a dump file that I downloaded from an Aura database with the following:

$ docker run -it -p 7687:7687 -p 7474:7474 -v $PWD/data:/data -v ~/Downloads:/import neo4j:3.5.18 
 neo4j-admin load --from=/import/foo.dump


Warning: Folder mounted to "/data/databases" is not writable from inside container. Changing folder owner to neo4j.
Done: 55 files, 8.078MiB processed.

So that imports the dump file into the mounted data directory. And then start up the Neo4j Docker container like this:

$ docker run -it -p 7687:7687 -p 7474:7474 -v $PWD/data:/data -v ~/Downloads:/import neo4j:3.5.18 
Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /var/lib/neo4j/plugins
  import:       /import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2020-06-05 16:42:11.622+0000 INFO  ======== Neo4j 3.5.18 ========
2020-06-05 16:42:11.631+0000 INFO  Starting...
2020-06-05 16:42:13.744+0000 INFO  Bolt enabled on
2020-06-05 16:42:14.961+0000 INFO  Started.
2020-06-05 16:42:15.968+0000 INFO  Remote interface available at http://localhost:7474/
2020-06-05 16:42:43.660+0000 WARN  The client is unauthorized due to authentication failure.
2020-06-05 16:42:47.835+0000 WARN  The client is unauthorized due to authentication failure.

@mark.needham Thanks for replying.

The version of the docker image I'm using is 4.0.4.

3.5.18 also worked for me when I try import.

In fact, what I found out is that when I use a "data" directory with a symlink, this error occurs, even if not using the docker container. In the docker container, the "data" directory is a symlink so I wonder if that's the reason. Again, this behavior only happens for version 4.