Database Backups
  • 27 Sep 2024
  • 3 Minutes To Read
  • Dark
    Light
  • PDF

Database Backups

  • Dark
    Light
  • PDF

Article summary

Mambu allows users with Download Backups permission to perform database backups using API v2 endpoint for best practices. It is recommended to initiate backups after finalizing daily account states. The backup is stored for 30 days, and Mambu Extract is suggested for specific situations. When triggering a backup, defining callback URLs and specific tables can optimize the process. It is advised to allow at least 24 hours between backups and check response payloads for success or errors. In case of failure, a new request is recommended, and automatic restart may occur after machine restart.

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 Mambu API v2 endpoint, since certain parameter methods such as tables and createBackupFromDate are only supported in the API v2 endpoint.

In this article, we provide database backup best practices.

End of day jobs and database backup

We recommend you initiate database backups after the accounts state has been finalised for the day.

In order to be notified when this is the case, we suggest you set up an Accounts Updated webhook, for more information see EOD Accounts Updated Notification

API operations

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

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

Backup storage

The generated database backup is kept for 30 days. After 30 days it is removed and you need to issue another API call to generate a new backup.

Mambu Extract

You should consider using Mambu Extract rather than the API database backup method if you have the following situations:

  • If your database backup time reaches six hours. The hard limit is 24 hours.
  • If the extracted data needs to have a defined SLA or other important business requirements. Mambu Extract is generally faster and more reliable than API backups.

Best practices

When you trigger a database backup, you may define an optional callback URL in the request body which will be triggered when the backup process 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 createBackupFromDate value in the body of your request. The createBackupFromDate value must be in the yyyy-MM-dd'T'HH:mm:ssZ format.

We recommend:

  • If you have more than one terabyte of data, use the tables array and, if possible, the createBackupFromDate property when performing a database backup to avoid timeout errors.
  • Using API v2 to trigger the database backup instead of the Mambu UI.
  • Defining the callback URL in order to be notified when the backup process 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.
  • Checking the response payload received at your callback URL to determine if the database backup was successful or if any errors were encountered.

If the database backup operation is successful, you will get a response payload at your callback URL similar to the following example:

{
    "tenantId": "TENANT_NAME",
    "result": "COMPLETE",
    "domain": "TENANT_NAME.mambu.com"
    "fileName": "tenant-MANUAL-DATABASE-BACKUP"
}

If the database backup operation is unsuccessful, you will get a response payload at your callback URL similar to the following example:

{
    "tenantId": "TENANT_NAME",
    "result": "ERROR",
    "domain": "TENANT_NAME.mambu.com"
}

If the operation is unsuccessful, we recommend you make another request. In case of multiple failed database backup operations, please contact us through Mambu Support.

Database backup will restart automatically in the case of a machine restart, unless a critical error was encountered. If this happens, the client will have to restart manually.

Please Note

If you receive the error message: The provided table list is invalid. Tables which cannot be filtered by date: [table list], this means that you have mixed up tables that can be filtered with the createBackupFromDate parameter with tables that cannot be filtered with this parameter. If this occurs, you can perform two separate backups:

  • Tables which can be filtered
  • Tables which cannot be filtered.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence