一般来说,我有两个问题:
有没有办法在嵌入式模式下禁用日志记录?(我有一个有很多删除/写入的数据库,一段时间后日志变得很大)
我可以在不损坏“主”数据库的情况下删除日志文件吗?(nioneo_logical.log.v26 等……以及 lucene 日志 lucene.log.v13 等……)
非常感谢!
Please have a look at http://docs.neo4j.org/chunked/stable/configuration-logical-logs.html
Would that make your life easier? Those logs contain the transaction information and can most likely be deleted after a while. In a High Availability setup they play a bigger role as they are the main mean of transferring data between the HA cluster members.
nioneo_logical.log... files contain the transaction data for the nodes, relationships and all that, whereas lucene.log... contain the index transaction data.
没有尝试过,但似乎是传递配置的合适解决方案:
Map<String, String> config = new HashMap<String, String>();
config.put( "keep_logical_logs", "30 days" );
// Or: config.put( "keep_logical_logs", "100M size" );
graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(
"target/read-only-db/location" )
.setConfig( config )
.newGraphDatabase();