Can you use a Neo4j database created on a Windows machine as data volume of Neo4j on Docker? -


i have installed neo4j (3.0.4) on windows machine (win 10 pro). started experiment docker. first used docker toolbox, last week switched docker windows. pulled neo4j image , read possible map docker data volume existing neo4j instance on host machine. when tried create mapping ran problems.

my neo4j instances on host located in c:/users/… subfolder. understood, folder should default shared between host , guest system. sure however, explicitly shared whole c-drive explained in this post.

in order map folder specific neo4j database (hereafter called: mygraphdb), started neo4j container following command: docker run --publish=7474:7474 --publish=7687:7687 -v c:/users/<my subpath>/neo4j/mygraphdb.graphdb:/data neo4j

when opened neo4j ui in browser got new empty database. tried verify databases find in docker container means of following commands:

docker exec -it <containername> /bin/bash  ls /data 

it contained 2 folders:

  • databases
  • dbms

so apparently mapping not created.

next tried map folder containing al neo4j databases docker container adjusting docker command: docker run –publish=7474:7474 –publish=7687:7687 -v c:/users/<my subpath>/neo4j:/data neo4j

when verified content of data folder in container found 3 folders:

  • myfirstgraphdb
  • databases
  • dbms

so apparently had mapped first database host machine’s folder, folder contained 5 databases. , when looked in “myfirstgraphdb” folder in container empty. although on host machine quite big , contains many files , subfolders.

due these problems (and because took quite time) wondering if possible share neo4j databases created on windows neo4j on docker? neo4j data seems organized differently on windows , linux. before continueing experiments therefore prefer sure feasible.


Comments