Database Backups
  • 05 Apr 2023
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

Database Backups

  • Dark
    Light
  • PDF

Article Summary

Mambu allows users or API consumers that have the Download Backups (DOWNLOAD_BACKUPS) permission to perform database backups. We recommend performing database backups using the Database Backup API v2 endpoint. In this article, we provide some more database backup best practices.

Please Note

You may also perform database backups using the Mambu UI, however we do not recommend this approach. For more information, see Data Migration Overview - Database Backup.

API Operations

The database backup endpoint in API v2 provides you with two operations. You may use the triggerBackup operation to request the database backup to be generated. For more information, see Database backup - triggerBackup.

Next, you may use the downloadBackup operation to request the download of the database backup. For more information, see Database Backup - downloadBackup.

Best practices for triggering a database backup

When you trigger a database backup, you may define an optional callback URL in the request body which will be triggered when the database download is complete. Additionally, you may define specific tables that you want to backup using the tables array in the request body. For a list of available tables, see Data Dictionary.

Finally, if you have defined a list of tables using the tables array and all the defined tables have a creationdate you may also define a creationBackupFromDate value in the body of your request. The creationBackupFromDate value must be in the yyyy-MM-dd'T'HH:mm:ssZ format.

We recommend:

  • Using API v2 to trigger the database backup instead of the Mambu UI.
  • Defining the callback URL in order to be notified when the database backup is complete.
  • Performing a database backup by defining specific tables using the tables array to decrease the execution time for the database backup and avoid timeout errors.
  • Defining a creationBackupFromDate value, in situations where all the tables defined have a creationdate value, to further decrease database backup execution time.
  • Allowing for at least 24 hours between database backups.
Please Note

If you have more than one terabyte of data, we strongly recommend using the tables array and (if possible) time partitioning when performing a database backup to avoid timeout errors.

End of day jobs and database backup

We recommend you initiate database backups after the End of Day (EOD) job execution is completed. For more information about EOD jobs, see End of Day Processing and Cron Jobs.

In order to be notified when EOD jobs execution is completed, we suggest you set up an Accounts Updated (END_OF_DAY_PROCESSING_COMPLETED) webhook. For more information, see Defining a New Webhook.


Was this article helpful?