Backing Up MongoDB with Backup Ninja

Backing Up MongoDB with Backup Ninja

Profile picture for user LukasVileikis
Lukas Vileikis
03 June 2021

If you found yourself working with MongoDB at least once in a while, chances are that you have wondered how you should go about backing up your MongoDB instances. This blog should provide you with some insight on how to do that using Backup Ninja.

Why Should You Back Up Your MongoDB Instances?

If you are a database administrator, it is probably obvious that you should back up all of your database instances (whether they are MongoDB or not), but if you’re not, keep in mind that by backing up your MongoDB instances you can make sure that your databases can always run smoothly, no matter the hiccup that gets in the way.

Backing Up MongoDB Instances with Backup Ninja

To get started, launch Backup Ninja and navigate to the Servers menu, click on Add Server:

Adding a Database Server

Once you are prompted on what kind of backups you want to perform, choose MongoDB:

MongoDB Database Backups

Once you have selected what kind of backups you want to perform, create a new user or use an existing one:

Creating a new user

Install your database agent:

Instaling a DB agent

The command printed below differs a bit if you want to run it as a root user instead of a sudo user, so keep that in mind. Run the command on the server where you want the agent to run.

Finally, discover your servers and you should be good to go!

 

Server discovery

That’s it - it’s as easy as that! Now you know how you should go about backing up your MongoDB database instances with Backup Ninja.

Tags