Turn daily database backups on or off
set_database_backup_schedule
Turns the automatic daily database backup of a site on or off, the same as the Daily backups switch in CMS settings.
It only controls the archive the platform takes each night. With it off, the nightly run skips the site and takes no new automatic database backup until it is turned back on. Manual backups with create_database_backup still work either way, and every archive the site already holds stays, still listed and still thinned as it ages, so turning it off deletes nothing.
It is set apart from daily storage backups, so changing one leaves the other as it was. Daily database backups are on for every site until someone turns them off, and the response carries enabled with the setting as it now stands. Any member of the workspace can change it.
It is refused outright on a site whose eligibility reads unsupported in list_database_backups, with Database backups are only available for sites on the newer database!, because a site that is not on the newer database cannot be backed up at all. On a site whose eligibility reads no-database the setting is accepted but no daily backup runs until a database exists. On a workspace without a paid plan it is accepted but changes nothing until the plan is paid, because the daily backup only ever runs on a paid plan.
The tool tells the client to change it only when you ask, and to say plainly that with it off no new daily archive of your data is taken. See Turn daily database backups off.
Request
Call it with a POST to https://api.modulify.ai/v1/set_database_backup_schedule, sending the inputs below as a JSON object. The token needs the sites:write scope.
It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.
curl -X POST https://api.modulify.ai/v1/set_database_backup_schedule \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID","enabled":true}'Over MCP, the same method is the set_database_backup_schedule tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site whose daily database backup should be turned on or off. |
enabled |
boolean | Yes | True to take the automatic daily database backup, false to stop taking it. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.