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.

Mafuba
  • 603
  • 6
  • 19

1 Answers1

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

akollegger
  • 1,124
  • 10
  • 13
  • 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? – Mafuba Nov 24 '13 at 23:06
  • 1
    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. – akollegger Nov 28 '13 at 20:06