hagopj13 / node-express-boilerplate

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose
MIT License
6.66k stars 1.97k forks source link

MongoDB data loss #289

Open flitzcore opened 4 months ago

flitzcore commented 4 months ago

I'm using MongoDb Atlas M0 Cluster for this project. It begin when I add a few user and do some testing. I add a few users. but I notice that I'm losing the users. Somehow the MongoDb data got reset. It left me with user collection but no user inside. Anyone have the same issue? Or anyone know why this happen?

waybacktolove commented 3 weeks ago

yes, this problem is affect to me. i losed mongodb data in all docs

waybacktolove commented 3 weeks ago

have you find the way to resolve this problem?

flitzcore commented 3 weeks ago

unfortunately no. I don't even know what caused it. I can't even replicate the error. All I can do is setup periodic backup

waybacktolove commented 3 weeks ago

Thank you for your response! I am wondering if the data loss might be caused by running MongoDB in Docker. Have you ever tried running MongoDB directly on a server? If so, was it feasible? Also, for your scheduled backup tasks, what would be a good interval for execution?

flitzcore commented 3 weeks ago

I run it in server all this time and still got data loss. I think its because this template use old version of mongodb. I run the backup once every 30 min because my app doesn't have critical data