Managing Backup and Failover in Ambience 202x via MongoDB

Backup and failover in Ambience instances are managed at the MongoDB level. To ensure data integrity and high availability, leveraging MongoDB’s built-in backup and failover features in the following considerations:

1. Regular MongoDB Backups:

  • Recommended scheduling regular backups using mongodump to create snapshots of the MongoDB databases. The frequency of the backups should be based on the system’s usage and recovery requirements.
  • For a complete backup strategy, ensure both the data and the relevant configuration files are included.
  • Use a task scheduler (e.g., cron for Linux or Task Scheduler for Windows) to automate these backups at regular intervals.
  • Note: It is advised to stop the Ambience instance first before doing any MongoDB backup to ensure there’s no ongoing process happening during the backup process for data integrity.

2. Determining the Databases to Back Up:

  • The MongoDB databases used by Ambience are listed in the etc/application.conf file located in the Ambience Server installation directory. This file contains the necessary information regarding the MongoDB connections, including the database names.

3. Cleaning Up Temp Databases:

  • Before performing backups, it is recommended to remove or exclude any temporary or unnecessary databases from the backup process. This ensures you only preserve essential data and reduce storage overhead.

4. Failover Configuration:

  • You can set up MongoDB replication to ensure high availability. MongoDB’s replica sets allow automatic failover, which ensures that if one MongoDB node goes down, another can automatically take over.
  • For a more comprehensive failover solution, consider using a combination of MongoDB replica sets and load balancers.

5. Monitoring:

  • To ensure smooth operation, we recommend monitoring the Ambience folder and the folder where MongoDB stores data (typically defined in the mongod.conf file). By syncing these folders between environments (e.g., production and disaster recovery environments), you can maintain data consistency and ensure readiness for failover.

6. Environment-specific Considerations:

  • The exact approach may vary depending on the operating system and the overall infrastructure. Be sure to tailor your backup and failover strategies to suit your specific environment, including considerations for network bandwidth, storage capacity, and database size.