[Neo4j] Indices missing on database copy
By the way, thanks to Michael and T. noppanit for your quick replies! Grace and peace, WBT ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Indices missing on database copy
Hello all, I have a moderate size Neo4j graph database (100G) with several manual and automatic indices. It was built on a Linux server that I'll call Machine A. I can copy [cp] the database directory to another folder on the same machine, and it seems to work fine. I can open the database in Gremlin, type g.getIndices(), and it shows me the full list. When I copy [scp] the database to another machine, a Mac server I'll call B, and run the same version of Gremlin, opening the copied database, all but the two default indices are gone: gremlin g.getIndices() ==AUTOMATIC[edges:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jEdge][autoIndexKeys:null] ==AUTOMATIC[vertices:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex][autoIndexKeys:null] I have tried this a few times and made sure that there is nothing accessing the database at either the source or destination of the copy. Are the indices referenced by an absolute pathname, or host name, or something like that? I'd love to figure out why this is happening and how I can get the indices on the second copy, without having to re-construct the database on that machine. Any insight you have into this question would be appreciated. Thanks, WBT ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Indices missing on database copy
DId you zip the files up before copying them? Perhaps you forgot -r for recursive packaging? If you copied the files directly you also have to provide a -r flag for recursive subdirectory copying. Could you check if the index files are there on the filesystem (on the source and target machine) ? du -sh graph.db/index/lucene/node/* Cheers Michael Am 04.08.2011 um 23:31 schrieb WBT: Hello all, I have a moderate size Neo4j graph database (100G) with several manual and automatic indices. It was built on a Linux server that I'll call Machine A. I can copy [cp] the database directory to another folder on the same machine, and it seems to work fine. I can open the database in Gremlin, type g.getIndices(), and it shows me the full list. When I copy [scp] the database to another machine, a Mac server I'll call B, and run the same version of Gremlin, opening the copied database, all but the two default indices are gone: gremlin g.getIndices() ==AUTOMATIC[edges:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jEdge][autoIndexKeys:null] ==AUTOMATIC[vertices:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex][autoIndexKeys:null] I have tried this a few times and made sure that there is nothing accessing the database at either the source or destination of the copy. Are the indices referenced by an absolute pathname, or host name, or something like that? I'd love to figure out why this is happening and how I can get the indices on the second copy, without having to re-construct the database on that machine. Any insight you have into this question would be appreciated. Thanks, WBT ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Indices missing on database copy
I suppose you could use luke http://code.google.com/p/luke/downloads/list to have a look that the indices are still there after copying. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Indices-missing-on-database-copy-tp3226778p3226806.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Indices missing on database copy
Nevermind. The issue was that, on machine B [Mac], the command g = new Neo4jGraph(~/fulldb/mydbnameCopy2) didn't substitute the ~ for my home directory. Instead of accessing the existing database, it quietly created a new database, which naturally had only the default indices and no data. I hope the illustration helps somebody else who might make this mistake... I would also recommend printing some message (Creating new database at ...) when doing so. Grace and peace, WBT On Thu, Aug 4, 2011 at 5:31 PM, WBT firstpeterfour...@gmail.com wrote: Hello all, I have a moderate size Neo4j graph database (100G) with several manual and automatic indices. It was built on a Linux server that I'll call Machine A. I can copy [cp] the database directory to another folder on the same machine, and it seems to work fine. I can open the database in Gremlin, type g.getIndices(), and it shows me the full list. When I copy [scp] the database to another machine, a Mac server I'll call B, and run the same version of Gremlin, opening the copied database, all but the two default indices are gone: gremlin g.getIndices() ==AUTOMATIC[edges:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jEdge][autoIndexKeys:null] ==AUTOMATIC[vertices:class com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jVertex][autoIndexKeys:null] I have tried this a few times and made sure that there is nothing accessing the database at either the source or destination of the copy. Are the indices referenced by an absolute pathname, or host name, or something like that? I'd love to figure out why this is happening and how I can get the indices on the second copy, without having to re-construct the database on that machine. Any insight you have into this question would be appreciated. Thanks, WBT ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user