Backups
Get Backups
page number
items per page
asc or desc
filter by serviceId value
filter by status value
OK
Bad Request
Not Found
Internal Server Error
GET /skybackup/v1/backups HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
"backups": [
{
"binlog_file": "text",
"binlog_gtid_position": "text",
"binlog_position": "text",
"cloud_provider": "gcp",
"disk_size": "text",
"disk_size_bytes": 1,
"end_time": "text",
"id": "text",
"is_external_storage": true,
"method": "text",
"point_in_time": "text",
"reference_full_backup": "text",
"server_pod": "text",
"service_id": "text",
"service_name": "text",
"start_time": "text",
"status": "text",
"storage_bytes": 1,
"type": "text"
}
],
"backups_count": 1,
"pages_count": 1
}
Get all Backups Schedules
page number
items per page
ServiceID Query
full,incremental,binarylog or dump
asc or desc
OK
Bad Request
Internal Server Error
GET /skybackup/v1/backups/schedules?service_id=text HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
"pages_count": 1,
"schedules": [
{
"cloud_provider": "gcp",
"created_at": "text",
"id": 1,
"labels": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"message": "text",
"schedule": "once",
"scheduled_at": "text",
"service_id": "text",
"service_name": "text",
"status": "text",
"suspended": true,
"type": "text",
"updated_at": "text"
}
],
"schedules_count": 1
}
Create Backup Schedule
supported types of the backups are:
- full - Full backups create a complete backup of the database server in an remote bucket directory. The time the backup takes depends on the size of the databases you're backing up.
- incremental - incremental backups update a previous backup with whatever changes to the data have occurred since the backup
- binarylog - backups the binary log, which contains a record of all changes to the databases, both data and structure. It consists of a set of closed binary log files.
- dump - a backup that reproduces table structure and data, without copying the actual data files.
- snapshot - a backup that captures the state of the database persistent volume at a specific point in time.
Schedules supported:
- once - one time execution
- cron - Example for cron schedule '0 2 * * *' for more information about cron format: https://en.wikipedia.org/wiki/Cron
unique id of the database service
dbxxxxx
OK
Bad Request
Internal Server Error
POST /skybackup/v1/backups/schedules HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"backup_type": "full",
"external_storage": {
"bucket": {
"credentials": [
1
],
"path": "text"
}
},
"schedule": "once",
"service_id": "dbxxxxx"
}
{
"cloud_provider": "gcp",
"created_at": "text",
"id": 1,
"labels": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"message": "text",
"schedule": "once",
"scheduled_at": "text",
"service_id": "text",
"service_name": "text",
"status": "text",
"suspended": true,
"type": "text",
"updated_at": "text"
}
Get Backup schedule
Backup ID
OK
Bad Request
Not Found
Internal Server Error
GET /skybackup/v1/backups/schedules/{id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
"cloud_provider": "gcp",
"created_at": "text",
"id": 1,
"labels": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"message": "text",
"schedule": "once",
"scheduled_at": "text",
"service_id": "text",
"service_name": "text",
"status": "text",
"suspended": true,
"type": "text",
"updated_at": "text"
}
Delete Backup Schedule
Backup ID
OK
No content
Bad Request
Not Found
Conflict
Internal Server Error
DELETE /skybackup/v1/backups/schedules/{id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
No content
Update Backup Schedules details
Backup ID
supported types of the backups are:
- full - Full backups create a complete backup of the database server in an remote bucket directory. The time the backup takes depends on the size of the databases you're backing up.
- incremental - incremental backups update a previous backup with whatever changes to the data have occurred since the backup
- binarylog - backups the binary log, which contains a record of all changes to the databases, both data and structure. It consists of a set of closed binary log files.
- dump - a backup that reproduces table structure and data, without copying the actual data files.
- snapshot - a backup that captures the state of the database persistent volume at a specific point in time.
Schedules supported:
- once - one time execution
- cron - Example for cron schedule '0 2 * * *' for more information about cron format: https://en.wikipedia.org/wiki/Cron
determines if the backup schedule is suspended or not when a backup schedule is suspended no new backups will be created default value is false
OK
Bad Request
Not Found
Internal Server Error
PATCH /skybackup/v1/backups/schedules/{id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"backup_type": "full",
"schedule": "once",
"suspended": true
}
{
"cloud_provider": "gcp",
"created_at": "text",
"id": 1,
"labels": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"message": "text",
"schedule": "once",
"scheduled_at": "text",
"service_id": "text",
"service_name": "text",
"status": "text",
"suspended": true,
"type": "text",
"updated_at": "text"
}
Get All Backups per service
Service ID
OK
Bad Request
Not Found
Internal Server Error
GET /skybackup/v1/backups/{service_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
"binlog_file": "text",
"binlog_gtid_position": "text",
"binlog_position": "text",
"cloud_provider": "gcp",
"disk_size": "text",
"disk_size_bytes": 1,
"end_time": "text",
"id": "text",
"is_external_storage": true,
"method": "text",
"point_in_time": "text",
"reference_full_backup": "text",
"server_pod": "text",
"service_id": "text",
"service_name": "text",
"start_time": "text",
"status": "text",
"storage_bytes": 1,
"type": "text"
}
Was this helpful?