Reputation: 309
My Neo4j graph contains about 100,000 nodes, 200,000 properties and 120,009 relationships. The graph was migrated through various neo4j versions (all steps from 1.4 to 2.1.5). The graph.db directory went from OSX to Ubuntu 14.04. Now the problem is that the graph is usable in 1.9.x (e.g. 1.9.8), but not in 2.1.x (e.g. 2.1.5). Even if I properly stop the neo4j 1.9.8 server - I can't use this graph.db/ directory with 2.1.5. The neo4j version 2.1.x keeps saying that the server was not properly shut down. (see logs below)
As a workaround, I'd like to export all nodes and relationships out of 1.9.8 and import them in 2.1.5. What is the recommended approach to do that?
There is a lot of information about importing data into neo4j. [http://www.neo4j.org/develop/import][1] But there's very little information about exporting data (...)
1.9.8 messages.log
2014-10-05 18:01:48.305+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.index.keys hit=0 miss=84 switches=0 ooe=0 2014-10-05 18:01:48.310+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.index hit=0 miss=42 switches=0 ooe=0 2014-10-05 18:01:48.322+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.arrays hit=0 miss=0 switches=0 ooe=0 2014-10-05 18:01:48.335+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db hit=35722 miss=58399 switches=0 ooe=0 2014-10-05 18:01:48.346+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.relationshipstore.db hit=2 miss=15518 switches=0 ooe=0 2014-10-05 18:01:48.359+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.nodestore.db hit=14430 miss=111320 switches=0 ooe=0 2014-10-05 18:01:48.370+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore hit=0 miss=16 switches=0 ooe=0 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.n.x.NeoStoreXaDataSource]: NeoStore closed 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics START --- 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics END ---
1.9.8: console.log
2014-10-05 18:01:48.305+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.index.keys hit=0 miss=84 switches=0 ooe=0 2014-10-05 18:01:48.310+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.index hit=0 miss=42 switches=0 ooe=0 2014-10-05 18:01:48.322+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db.arrays hit=0 miss=0 switches=0 ooe=0 2014-10-05 18:01:48.335+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.propertystore.db hit=35722 miss=58399 switches=0 ooe=0 2014-10-05 18:01:48.346+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.relationshipstore.db hit=2 miss=15518 switches=0 ooe=0 2014-10-05 18:01:48.359+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore.nodestore.db hit=14430 miss=111320 switches=0 ooe=0 2014-10-05 18:01:48.370+0000 INFO [o.n.k.i.n.s.StoreFactory]: data/graph.db/neostore hit=0 miss=16 switches=0 ooe=0 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.n.x.NeoStoreXaDataSource]: NeoStore closed 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics START --- 2014-10-05 18:01:48.381+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics END ---
2.1.5 messages.log:
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.1.5.jar:2.1.5]
... 10 common frames omitted
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean state.
2.1.5. console.log:
at org.neo4j.kernel.DefaultFileSystemAbstraction.open(DefaultFileSystemAbstraction.java:62)
at org.neo4j.kernel.DefaultFileSystemAbstraction.open(DefaultFileSystemAbstraction.java:52)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.setActiveLog(XaLogicalLog.java:1284)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.close(XaLogicalLog.java:643)
at org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource.stop(LogBackedXaDataSource.java:69)
... 20 more
2014-10-05 15:39:24.980+0000 INFO [API] Setting startup timeout to: 120000ms based on -1 Detected incorrectly shut down database, performing recovery.. 2014-10-05 16:19:29.857+0000 INFO [API] Setting startup timeout to: 120000ms based on -1 Detected incorrectly shut down database, performing recovery..
Upvotes: 2
Views: 353
Reputation: 309
The migration path from neo4j version 1.9.8 via version 2.0.4 to version 2.1.5 seems to fix the problem.
yes, RTFM!
Upvotes: 1