Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data loss? #51

Open
ddavtian opened this issue Jun 26, 2019 · 4 comments
Open

data loss? #51

ddavtian opened this issue Jun 26, 2019 · 4 comments

Comments

@ddavtian
Copy link

Hosting my own version locally and things are running as expected. After sending lots of traffic the web container stopped accepting traffic and to fix the issue I issued the following two commands

docker-compose down followed by docker-compose up

Containers came up but now it seems that the user I had created previously and all the buckets are gone. Is there a way to recover to perhaps a better way to approach this issue in the future as I had created many different buckets, etc.

Thanks

@phstc
Copy link

phstc commented Jun 26, 2019

Hey

You can try to update the docker-compose.yml to use a volume for MongoDB. In the way it is, it is supposed to map MongoDB to the filesystem ./tmp/db so even up & down should work. Is there any chance you've also deleted ./tmp?

@ddavtian
Copy link
Author

@phstc thank you for your response, no I didn't remove ./tmp/db, it's still there

ls -lah tmp/
total 24K
drwxr-xr-x  6 root root 4.0K Jun 16 15:21 .
drwxr-xr-x 13 root root 4.0K Jun 26 16:35 ..
drwxr-xr-x  4 root root 4.0K Jun 16 18:08 cache
drwxr-xr-x  2 root root 4.0K Jun 16 15:21 db
drwxr-xr-x  2 root root 4.0K Jun 26 05:25 pids
drwxr-xr-x  2 root root 4.0K Jun 16 15:21 sockets

Looking within the db directory it seems empty though

@ddavtian
Copy link
Author

Probably a different issue that warrants another thread but quite frequently I am seeing this when reading the logs from the web container after issuing docker-compose up

MONGODB | Connection refused - connect(2) for 172.23.0.3:27017
MONGODB | Connection refused - connect(2) for 172.23.0.3:27017

@amotl
Copy link
Contributor

amotl commented Apr 29, 2020

Dear @ddavtian,

we experienced the same issue and then found [1] which explains it. We also summarized our production setup within #68 (comment).

With kind regards,
Andreas.

[1] https://stackoverflow.com/questions/53870416/data-does-not-persist-to-host-volume-with-docker-compose-yml-for-mongodb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants