Question

Mongo database data/db missing. Backup restore won't help.

I am (or was) running a website built with vue frontend and strapi backend. All data was held with a mongo database on the droplet.

Last week we noticed 502 errors on the strapi cms url and console errors in browser with no content showing from the api. After inspection, strapi had errored as mongod had stopped. I couldn’t find any /data/db folder and mongo was not running.

I have the DO backups and so went to restore from one of these but none of my backups have any database content or users. Both frontend and backend code works fine but its as if my database was never there and it is obviously messing with mongo as I can’t get it to run with systemd.

Should DO backups save your database or am I wrong? And if so then does anyone have an idea of what may have happened?

I’m really a frontend guy and this was my first foray into setting up a full site - it’s been fine for a year and now this!

Any help appreciated, if there’s any commands or error codes that may help debug please let me know


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey @jdsnow,

The Droplet snapshots are an exact backup of your server, generated at a specific time which means that the data should be there.

The data directory on Ubuntu servers is at /var/lib/mongodb.

If you connect to your MongoDB instance directly via the mongo CLI, do you see your data there?

Also, can you confirm if the MongoDB service is actually running?

- Bobby.