backup_schedules
Creates, updates, deletes, gets or lists a backup_schedules resource.
Overview​
| Name | backup_schedules |
| Type | Resource |
| Id | supabase.database.backup_schedules |
Fields​
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
schedule_for | string | Time of day to schedule daily backups, in UTC. Format: HH:MM:SS. (pattern: <code>^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:.\d+)?)?$</code>, example: 04:00:00) |
updated_at | string (date-time) | Timestamp of when the backup schedule was last updated. (pattern: <code>^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$</code>, example: 2026-05-04T14:40:44+00:00) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ref | ||
update | update | ref, schedule_for | Sets the time at which the daily backup runs. The change takes effect on the next backup window that includes the new time. If the new time has already passed for today, the first backup at the new time will occur the following day. It can only be updated 3 times per 24 hours. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
ref | string | Supabase project reference (the Project ID shown in the dashboard under Settings -> General; 20 lowercase letters). Resolved from the SUPABASE_PROJECT_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every project-scoped query as WHERE ref = '<ref>'. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: SUPABASE_PROJECT_ID) |
SELECT examples​
- get
No description available.
SELECT
schedule_for,
updated_at
FROM supabase.database.backup_schedules
WHERE ref = '{{ ref }}' -- required unless SUPABASE_PROJECT_ID is set
;
UPDATE examples​
- update
Sets the time at which the daily backup runs. The change takes effect on the next backup window that includes the new time. If the new time has already passed for today, the first backup at the new time will occur the following day. It can only be updated 3 times per 24 hours.
UPDATE supabase.database.backup_schedules
SET
schedule_for = '{{ schedule_for }}'
WHERE
ref = '{{ ref }}' --required unless SUPABASE_PROJECT_ID is set
AND schedule_for = '{{ schedule_for }}' --required
RETURNING
schedule_for,
updated_at;