简体   繁体   中英

Neo4j server with embedded database

I have an embedded Neo4j database created and used by a java process utilizing TinkerPop. I would like to use the Neo4j web admin and backup service with this database. I have now installed the server, but when I try to set the server database path to the existing embedded database, I get a StoreLockException (Could not create lock file) when starting the server.

How do I make this work so that I can administer and back up my database? Since I'm using TinkerPop, I actually have no direct Neo4j references in my code. The database used comes from a configuration file. I would like to avoid having to make hard dependencies on Neo4j in the code.

You can't access the database directory from two different processes at the same time. This isn't a code-level concern, just an operational concern.

You'd have to:

  1. Shutdown your application (thereby releasing the lock)
  2. Run a backup using Neo4j tooling (of your choice)
  3. Start your application back up again

For "live" backups without shutting down your application, you'd need to run a cluster using Neo4j Enterprise.

Cheers, Andreas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM