Backups
Create a backup schedule
Schedule a database dump or a volume archive.
Updated
https://cloud.cahaves.com/api/backup-schedules
Authorization
cahaves.cloud.sessionstringcookierequired
The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.
Headers
X-Cloud-Organizationstring<uuid>
The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.
Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"
Body
application/jsonrequired
kindstringrequired
Allowed values: "database_dump""volume_archive"
namestringrequired
enabledboolean
A JSON boolean. Left out, the schedule is paused and runs only when asked.
Default: false
volume_idstring<uuid>
Required for a volume archive, a volume attached to this application.
service_idstring<uuid>required
database_namestring
Required for a database dump. For MongoDB, the database to dump.
destination_idstring<uuid>required
interval_hoursinteger
Default: 24
keep_latest_countinteger
How many finished backups retention keeps. Ignored on Cloudflare R2, platform storage included, where nothing is pruned.
Default: 7
Responses
application/json
The schedule.
backup_scheduleobjectrequired
A database_dump needs database_name; a volume_archive needs volume_id, a volume attached to this application. A database's or compose stack's own volume cannot be archived, and Redis cannot be dumped. Backups lists what each database kind covers.
Left out, interval_hours is 24, keep_latest_count is 7 and enabled is false, so a schedule created without "enabled": true never runs on its timer; it runs only when asked. keep_latest_count has no effect on R2, platform storage included, where nothing is pruned.
The destination must be configured, or the request answers 409 with "Configure this destination before scheduling a backup." A service with a deployment or backup unfinished answers 409 too.