Backup Schedules

Add a backup schedule

Creates a new backup schedule for an Odoo instance. Backup schedules automate the process of creating regular backups according to your specified cron schedule and retention policy. This endpoint allows you to configure when backups should occur and how long they should be kept.

Key Parameters:

  • instanceId: The unique identifier of the instance for which to create the backup schedule
  • schedule: Cron expression defining when the backup should run (e.g., '00 08 * * *' for daily at 8:00 AM UTC)
    • Format: 'minute hour day-of-month month day-of-week'
    • Special values supported:
      • '@monthly' or '00 00 1 * *' (first day of month at midnight)
      • '@weekly' or '00 00 * * 0' (Sunday at midnight)
      • '@daily', '@midnight' or '00 00 * * *' (daily at midnight)
      • '@hourly' or '00 * * * *' (hourly at minute 00)
    • Interval patterns supported:
      • '00 */12 * * *' (every 12 hours)
      • '00 */6 * * *' (every 6 hours)
      • '00 */3 * * *' (every 3 hours)
  • retention: Number of days to retain backups before automatic deletion (common values: 7 for one week, 30 for one month, 90 for three months, 365 for one year)
  • providerId: Optional ID of a specific backup provider to use (if not specified, the default provider will be used)

NOTE: Multiple backup schedules can be created for a single instance with different schedules or retention policies. For example, you might want daily backups with a 7-day retention alongside weekly backups with a 30-day retention.

post/instances/{instanceId}/backup-schedules

Request

  • Base URL: https://api.cloudpepper.io
  • URL: https://api.cloudpepper.io/instances/{instanceId}/backup-schedules
  • Auth: HTTP bearer

Request body

schedulestring required

Cron expression defining when the backup should run. Format: 'minute hour day-of-month month day-of-week'.

Supported special values:

  • @monthly: Run once a month, first day at midnight ('00 00 1 * *')
  • @weekly: Run once a week, Sunday at midnight ('00 00 * * 0')
  • @daily, @midnight: Run once a day at midnight ('00 00 * * *')
  • @hourly: Run once an hour at the start of the hour ('00 * * * *')

Supported interval patterns:

  • '00 */12 * * *': Run every 12 hours
  • '00 */6 * * *': Run every 6 hours
  • '00 */3 * * *': Run every 3 hours

Standard cron examples:

  • '00 08 * * *': Run daily at 8:00 AM (UTC)
  • '00 20 * * *': Run daily at 8:00 PM (UTC)
  • '00 00 1 * *': Run at midnight on the first day of each month
  • '00 00 * * 0': Run at midnight on Sunday
retentioninteger required

Number of days to retain the backup. Common values: 7 (one week), 30 (one month), 90 (three months), 365 (one year).

providerIdstring uuid

Optional ID of a specific backup provider to use. If not specified, the default provider will be used.

Example request

{
  "schedule": "00 08 * * *",
  "retention": 7,
  "providerId": "550e8400-e29b-41d4-a716-446655440000"
}

Response

Backup schedule created successfully

keystring uuid

Unique identifier for the created backup schedule

Changes

No recorded changes to this operation across all 1 revision of this API.