Create a new snapshot backup schedule for a volume.
Required permission
Project > Volumes > Backups > Create
Path parameters
projectId
string requiredID of the projectvolumeId
string requiredID of the volume
Request body
- {object}
scheduling
{object} requiredSchedule for the backup.interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.- integerA minute when the backup should be performed.min0max59
hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the `minute` field. Required for `daily` and `weekly` intervals and unavailable for `hourly` intervals.- integerAn hour when the backup should be performed, in 24 hour format.min0max23
day
[array]An array of days of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday. On these days, a backup will be performed at each of the minutes provided in the `minute` field whenever it is an hour from the `hour` field. Required for `weekly` intervals and unavailable for `hourly` and `daily` intervals.- integerA day of the week when the backup should be performed, where `0` represents Monday and `6` represents Sunday.min0max6
retentionTime
integer requiredThe time the backup is retained for, in days.min1
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredID of the schedule.
API
CLI
JS Client
POST /v1/projects/{projectId}/volumes/{volumeId}/backup-schedules
POST /v1/teams/{teamId}/projects/{projectId}/volumes/{volumeId}/backup-schedules
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"scheduling":{"interval":"weekly","minute":[30],"hour":[18],"day":[4]},"retentionTime":7}' \
https://api.northflank.com/v1/projects/{projectId}/volumes/{volumeId}/backup-schedulesExample response
200 OK
Details about the created backup schedule.
JSON
{
"data": {
"id": "62cc20b90956ab62a58e8474"
}
}