Schedule Data Backup
Purpose
The Schedule Data Backup API in Zoho CRM enables users with Administrator privileges to schedule backups of all CRM data, including attachments. Users can choose to initiate the backup immediately or set it to occur at specified times. The resulting backup is provided as a CSV file compressed into a ZIP file.
Endpoints
- POST /backup
Request Details
Request URL
{api-domain}/crm/bulk/{version}/backup
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.bulk.backup.ALL
(or)
ZohoCRM.bulk.backup.CREATE
Possible operation types
ALL - Full access to backup data
CREATE - Schedule a backup
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/bulk/v8/backup"
-X POST
-d "backup_rule.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Note
If you want to backup CRM data immediately, leave the input body empty.
Input JSON
- rrulestring, mandatory if you want to schedule a backup at a designated time
Represents the recurrence rule for scheduling the backup at specific intervals
Repeat Rule Parameters
- FREQstring, mandatory
Defines how often the backup occurs.
Possible values:
WEEKLY - to schedule backups of CRM data at regular weekly intervals
MONTHLY - to schedule backups of CRM data on a monthly basis - INTERVALnumber, mandatory
The gap between each scheduled backup. For example, if you set an INTERVAL value of 2 for a weekly backup, the next backup will occur two weeks after the first one.
Possible values are between 1 and 52. - BYDAYstring, mandatory if BYMONTHDAY is not specified
Specifies the day of the week on which the backup will occur. This applies to weekly, monthly, and yearly backups.
Possible values:
SU - Sunday
MO - Monday
TU - Tuesday
WE - Wednesday
TH - Thursday
FR - Friday
SA - Saturday - BYMONTHDAYnumber, mandatory if BYDAY is not specified
Indicates the specific day of the month for monthly or yearly backups. Valid values range from 1 to 31.
Possible values are between 1 and 31.
Supported RRULE Examples
Here are some examples of valid rrule strings for scheduling backups:
- rrule: "RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=TH": Backup scheduled for every alternate Thursday
- rrule: "RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=16": Backup scheduled for 16th of every month
- rrule: "RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1TH": Backup scheduled for the first Thursday of every month
- rrule: "RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=4TH": Backup scheduled for the fourth Thursday of every month
- rrule: "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR": Backup scheduled for every Friday
Sample Input
Copied{
"backup": {
"rrule": "RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=TU"
}
}
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The request method is incorrect.
Resolution: Use the HTTP POST method to make this API call. Any other request method will result in this error. - INVALID_DATAHTTP 400
You have specified an invalid rule or rule pattern.
Resolution: Specify valid recurrence rule. Refer to the Input JSON section for more details. - BACKUP_ALREADY_SCHEDULEDHTTP 400
Backup is already scheduled
Resolution: You have already scheduled a backup. You must wait for the scheduled backup to complete before you can schedule another. - LIMIT_EXCEEDEDHTTP 400
Backup limit exceeded.
Resolution: You have exhausted the maximum number of available backups for your CRM edition. You can wait till the next month when your data backup limits are refreshed or purchase additional backup. - OAUTH_SCOPE_MISMATCHHTTP 401
The access token you have used to make this API call does not have the required scope.
Resolution: Generate a new access token with the required scopes for this API. Refer to the Scope section at the beginning of this page for the list of required scopes. - NO_PERMISSIONHTTP 403
Permission denied to create
Resolution: The user does not have permission to backup data. Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
The request URL is incorrect.
Resolution: Specify a valid request URL. Refer to the request URL section at the beginning of this page for more details. - INTERNAL_ERRORHTTP 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
"backup": {
"status": "success",
"code": "SUCCESS",
"message": "Backup scheduled successfully.",
"details": {
"id": "4876876000001593003"
}
}
}