neo4j / docker-neo4j

Docker Images for the Neo4j Graph Database
Apache License 2.0
336 stars 171 forks source link

Stopping neo4j to dump database state does not work #415

Closed theloglizard closed 1 year ago

theloglizard commented 1 year ago

Guidelines

I'm using neo4j:latest in docker with reasonable success, but when I try to stop neo4j to run :

neo4j-admin dump . . .

the docker process terminates and I get no joy. I see a merge request seeming to address the same issue here:

https://github.com/neo4j/docker-neo4j-publish/pull/7/commits/6505a9565066c37648ab6a7141d7c7ed9f6e66f0

but it doesn't seem to have been merged into the baseline. Assuming it causes no issues, can this be merged, please?

Thanks!

jennyowen commented 1 year ago

I'm a bit confused about what you're doing to get this problem.

So you have neo4j running in a container, then you (I guess?) docker exec into that container to stop neo4j and to run the dump command?

Generally it's a good idea to have your /data directory mounted to a host folder or another volume so your database can persist when the container stops. This is important if you want to make backups, because then you can just run a new neo4j/neo4j:neo4j-admin container on the host data folder to create the backup file.

The documentation for backing up a docker neo4j database is here: https://neo4j.com/docs/operations-manual/current/docker/maintenance/

theloglizard commented 1 year ago

Yeah, well I have a neo4j dump in my mounted directories. You got my problem backward. I want to LOAD a previously built database coming in via a mounted host directory via neo4j-admin, and one needs to stop the database (which because of the way the container is constructed makes the master process terminate). Then the database can't be restarted because everything has completed..

I've moved on by making my own container, etc, but others have had this issue and the patch I commented on might help others.

On Wed, Jan 25, 2023 at 10:49 AM Jenny Owen @.***> wrote:

I'm a bit confused about what you're doing to get this problem.

So you have neo4j running in a container, then you (I guess?) docker exec into that container to stop neo4j and to run the dump command?

Generally it's a good idea to have your /data directory mounted to a host folder or another volume so your database can persist when the container stops. This is important if you want to make backups, because then you can just run a new neo4j/neo4j:neo4j-admin container on the host data folder to create the backup file.

The documentation for backing up a docker neo4j database is here: https://neo4j.com/docs/operations-manual/current/docker/maintenance/

— Reply to this email directly, view it on GitHub https://github.com/neo4j/docker-neo4j/issues/415#issuecomment-1403828283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLHGCCYK3TJPMR37SERKBTWUFDPBANCNFSM6AAAAAATCRMWAA . You are receiving this because you authored the thread.Message ID: @.***>