Skip to content

[New] Managed MySQL Database Backup Snapshot Create #618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 83 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3534,9 +3534,9 @@ paths:

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

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

Database backups are created every 24 hours at 0:00 UTC. Each backup is retained for 7 days.
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.

**Beta**: This endpoint is in **open** beta. During the beta period, Managed Databases will not incur any charges.
If you deploy a Managed Database during this time, you will receive a notice with pricing details in advance of the
Expand Down Expand Up @@ -3571,6 +3571,87 @@ paths:
- lang: CLI
source: >
linode-cli databases mysql-backups-list 123
post:
tags:
- Databases
summary: Managed MySQL Database Backup Snapshot Create
operationId: postDatabasesMySQLInstanceBackup
servers:
- url: https://api.linode.com/v4beta
x-linode-cli-action: mysql-backup-snapshot
x-linode-grant: unrestricted only
description: |
Creates a snapshot backup of a Managed MySQL Database.

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.

The Database must have an `active` status to perform this command.

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

**Beta**: This endpoint is in **open** beta. During the beta period, Managed Databases will not incur any charges.
If you deploy a Managed Database during this time, you will receive a notice with pricing details in advance of the
GA (general availability) release.
When accessing this endpoint, please make sure to prepend all requests with `/v4beta` instead of `/v4`, and be
aware that this endpoint may receive breaking updates in the future. This notice will be removed when this
endpoint is out of beta.
security:
- personalAccessToken: []
- oauth: []
requestBody:
description: Information about the snapshot backup to create.
content:
application/json:
schema:
required:
- label
type: object
properties:
label:
type: string
minLength: 3
maxLength: 64
description: |
The label for the Database snapshot backup.

* Must use only letters, numbers, underscores, dashes, and periods.
* Must begin and end with a letter or number.
* Must not include two dashes, underscores, or periods in a row.
example: db-snapshot
target:
type: string
enum:
- primary
- secondary
default: primary
description: |
The Database cluster target.

If the Database is a high availability cluster, choosing `secondary` creates a snapshot backup of a replica node.
example: primary
responses:
'200':
description: Database snapshot backup request successful.
content:
application/json:
schema:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "db-snapshot",
"target": "primary"
}' \
https://api.linode.com/v4beta/databases/mysql/instances/123/backups/
- lang: CLI
source: >
linode-cli databases mysql-backup-snapshot 123 \
--label db-snapshot \
--target primary
/databases/mysql/instances/{instanceId}/backups/{backupId}:
x-linode-cli-command: databases
parameters:
Expand Down