In this tutorial, we'll guide you through configuring your MongoDB server to accept connections from our backup server, verify its accessibility and create the backup.
Step 1: Configure Firewall
To allow connections from our backup server, configure your firewall using the following command. This example assumes your database server is running on port 27017.
iptables -A INPUT -p tcp -s 5.75.251.5 --dport 27017 -j ACCEPT
Step 2: Allow Remote Connection
Enabling remote database access is an individual process. If you have a database created through a provider such as https://www.mongodb.com, remote access is automatically enabled. If you have your own MongoDB server, you can follow this guide HERE
Step 3: Configure Backup in BoostBackup
- Navigate to the BoostBackup dashboard.
- Go to the Backups section.
- Click on the + Create Backup button.
- Fill in your database credentials as shown in the example below:
Click the SAVE button to verify the credentials. The system will check the connection and display any errors above the form.
Step 4: Schedule Your Backup
Set the schedule for when the backup should run in the Schedule the backup section.
Step 5: Configure Backup Storage
Choose where the backups should be stored. For each remote storage option, we provide separate manuals which can be found HERE.
Optional Step: Configure Storage Cleanup
Set the storage cleanup interval based on your preference:
- By capacity: Enter sizes in megabytes (500M) or gigabytes (20G), etc.
- By creation date: Specify durations like older than 2 months (2m) or 7 days (7d).
- By quantity: Limit the number of backup files.
- Smart format: Set values for daily, weekly, monthly, and annual retention.
Optionally, set a minimum file size check. For example, if a backup is smaller than 100MB (100M), it will be marked as an error, and you will be notified if you have configured notifications correctly. Details on setting up notifications can be found HERE.
Final Step: Enable Notifications
Ensure the checkbox for automatically creating notifications is checked. This will set up alerts, such as email notifications for backup failures, which can be found in the Alerts section.
That's it! Your database server is now configured for backups.