backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | deno.database.backups |
Fields
The following fields are returned by SELECT queries:
- list_kv_backups
- get_kv_backup
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the backup |
status | | The status of a KV database backup. |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The ID of the backup |
status | | The status of a KV database backup. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_kv_backups | select | databaseId | This API returns a list of backups of the specified KV database. Note that currently more than one backups are not supported for a single database. So this API will return either an empty list or a list with a single item. | |
get_kv_backup | select | databaseBackupId | This API returns the details of the specified database backup. | |
enable_kv_backup | exec | databaseId, endpoint, bucketName, bucketRegion, accessKeyId, secretAccessKey, kind | This API allows you to enable a backup for a KV database. The backup can be stored in your S3 bucket. Currently, only one backup can be enabled per database. When a second backup is being configured, the API will return a 409 Conflict error. | |
disable_kv_backup | exec | databaseBackupId | This API allows you to disable a backup for a KV database. |
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 |
|---|---|---|
databaseBackupId | string (uuid) | KV Backup ID |
databaseId | string (uuid) | KV database ID |
SELECT examples
- list_kv_backups
- get_kv_backup
This API returns a list of backups of the specified KV database.
Note that currently more than one backups are not supported for a single
database. So this API will return either an empty list or a list with a
single item.
SELECT
id,
status
FROM deno.database.backups
WHERE databaseId = '{{ databaseId }}' -- required
;
This API returns the details of the specified database backup.
SELECT
id,
status
FROM deno.database.backups
WHERE databaseBackupId = '{{ databaseBackupId }}' -- required
;
Lifecycle Methods
- enable_kv_backup
- disable_kv_backup
This API allows you to enable a backup for a KV database. The backup can be
stored in your S3 bucket.
Currently, only one backup can be enabled per database. When a second backup
is being configured, the API will return a 409 Conflict error.
EXEC deno.database.backups.enable_kv_backup
@databaseId='{{ databaseId }}' --required
@@json=
'{
"endpoint": "{{ endpoint }}",
"bucketName": "{{ bucketName }}",
"bucketRegion": "{{ bucketRegion }}",
"accessKeyId": "{{ accessKeyId }}",
"secretAccessKey": "{{ secretAccessKey }}",
"prefix": "{{ prefix }}",
"kind": "{{ kind }}"
}'
;
This API allows you to disable a backup for a KV database.
EXEC deno.database.backups.disable_kv_backup
@databaseBackupId='{{ databaseBackupId }}' --required
;