0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Andreas. When you say run a cluster for backups, do you mean some instances embedded and at least one instance as a server, thereby getting access to the web admin and backup service?
Yes, operationally the easiest thing to do would be to have a mixed-deployment of embedded (for your app) with server for failover and backups. It would also be possible to run your embedded application in HA-mode as a single member cluster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.