Skip to content

Commit 7725a36

Browse files
authored
Merge pull request #618 from bbiggerr/dbaas-mysql-snapshot-backup
[New] Managed MySQL Database Backup Snapshot Create
2 parents dc5988d + 93ba40e commit 7725a36

File tree

1 file changed

+83
-2
lines changed

1 file changed

+83
-2
lines changed

openapi.yaml

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3524,9 +3524,9 @@ paths:
35243524

35253525
Only unrestricted Users can access this command, and have access regardless of the acting token's OAuth scopes.
35263526

3527-
At this time, only automatically scheduled backups (type `auto`) are available.
3527+
Database `auto` type backups are created every 24 hours at 0:00 UTC. Each `auto` backup is retained for 7 days.
35283528

3529-
Database backups are created every 24 hours at 0:00 UTC. Each backup is retained for 7 days.
3529+
Database `snapshot` type backups are created by accessing the **Managed MySQL Database Backup Snapshot Create** ([POST /databases/mysql/instances/{instanceId}/backups](/docs/api/databases/#managed-mysql-database-backup-snapshot-create)) command.
35303530

35313531
**Beta**: This endpoint is in **open** beta. During the beta period, Managed Databases will not incur any charges.
35323532
If you deploy a Managed Database during this time, you will receive a notice with pricing details in advance of the
@@ -3561,6 +3561,87 @@ paths:
35613561
- lang: CLI
35623562
source: >
35633563
linode-cli databases mysql-backups-list 123
3564+
post:
3565+
tags:
3566+
- Databases
3567+
summary: Managed MySQL Database Backup Snapshot Create
3568+
operationId: postDatabasesMySQLInstanceBackup
3569+
servers:
3570+
- url: https://api.linode.com/v4beta
3571+
x-linode-cli-action: mysql-backup-snapshot
3572+
x-linode-grant: unrestricted only
3573+
description: |
3574+
Creates a snapshot backup of a Managed MySQL Database.
3575+
3576+
Backups generated by this command have the type `snapshot`. Snapshot backups may take several minutes to complete, after which they will be accessible to view or restore.
3577+
3578+
The Database must have an `active` status to perform this command.
3579+
3580+
Only unrestricted Users can access this command, and have access regardless of the acting token's OAuth scopes.
3581+
3582+
**Beta**: This endpoint is in **open** beta. During the beta period, Managed Databases will not incur any charges.
3583+
If you deploy a Managed Database during this time, you will receive a notice with pricing details in advance of the
3584+
GA (general availability) release.
3585+
When accessing this endpoint, please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be
3586+
aware that this endpoint may receive breaking updates in the future. This notice will be removed when this
3587+
endpoint is out of beta.
3588+
security:
3589+
- personalAccessToken: []
3590+
- oauth: []
3591+
requestBody:
3592+
description: Information about the snapshot backup to create.
3593+
content:
3594+
application/json:
3595+
schema:
3596+
required:
3597+
- label
3598+
type: object
3599+
properties:
3600+
label:
3601+
type: string
3602+
minLength: 3
3603+
maxLength: 64
3604+
description: |
3605+
The label for the Database snapshot backup.
3606+
3607+
* Must use only letters, numbers, underscores, dashes, and periods.
3608+
* Must begin and end with a letter or number.
3609+
* Must not include two dashes, underscores, or periods in a row.
3610+
example: db-snapshot
3611+
target:
3612+
type: string
3613+
enum:
3614+
- primary
3615+
- secondary
3616+
default: primary
3617+
description: |
3618+
The Database cluster target.
3619+
3620+
If the Database is a high availability cluster, choosing `secondary` creates a snapshot backup of a replica node.
3621+
example: primary
3622+
responses:
3623+
'200':
3624+
description: Database snapshot backup request successful.
3625+
content:
3626+
application/json:
3627+
schema:
3628+
type: object
3629+
default:
3630+
$ref: '#/components/responses/ErrorResponse'
3631+
x-code-samples:
3632+
- lang: Shell
3633+
source: >
3634+
curl -H "Authorization: Bearer $TOKEN" \
3635+
-X POST -d '{
3636+
"label": "db-snapshot",
3637+
"target": "primary"
3638+
}' \
3639+
https://api.linode.com/v4beta/databases/mysql/instances/123/backups/
3640+
- lang: CLI
3641+
source: >
3642+
linode-cli databases mysql-backup-snapshot 123 \
3643+
--label db-snapshot \
3644+
--target primary
35643645
/databases/mysql/instances/{instanceId}/backups/{backupId}:
35653646
x-linode-cli-command: databases
35663647
parameters:

0 commit comments

Comments
 (0)