Managed Service for YDB API, gRPC: DatabaseService.Backup
gRPC request
rpc Backup (BackupDatabaseRequest) returns (operation.Operation)
BackupDatabaseRequest
{
"database_id": "string",
"backup_settings": {
"name": "string",
"description": "string",
"backup_schedule": {
// Includes only one of the fields `daily_backup_schedule`, `weekly_backup_schedule`, `recurring_backup_schedule`
"daily_backup_schedule": {
"execute_time": "google.type.TimeOfDay"
},
"weekly_backup_schedule": {
"days_of_week": [
{
"days": [
"DayOfWeek"
],
"execute_time": "google.type.TimeOfDay"
}
]
},
"recurring_backup_schedule": {
"start_time": "google.protobuf.Timestamp",
"recurrence": "string"
},
// end of the list of possible fields
"next_execute_time": "google.protobuf.Timestamp"
},
"backup_time_to_live": "google.protobuf.Duration",
"source_paths": [
"string"
],
"source_paths_to_exclude": [
"string"
],
"type": "Type",
"storage_class": "StorageClass"
}
}
|
Field |
Description |
|
database_id |
string |
|
backup_settings |
custom backup options, if required. |
BackupSettings
|
Field |
Description |
|
name |
string name of backup settings The maximum string length in characters is 256. |
|
description |
string human readable description. The maximum string length in characters is 256. |
|
backup_schedule |
provide schedule. if empty, backup will be disabled. |
|
backup_time_to_live |
provide time to live of backup. |
|
source_paths[] |
string provide a list of source paths. Each path can be directory, table or even database itself. The maximum number of elements is 256. |
|
source_paths_to_exclude[] |
string provide a list of paths to exclude from backup. The maximum number of elements is 256. |
|
type |
enum Type
|
|
storage_class |
enum StorageClass
|
BackupSchedule
|
Field |
Description |
|
daily_backup_schedule |
Includes only one of the fields |
|
weekly_backup_schedule |
Includes only one of the fields |
|
recurring_backup_schedule |
Includes only one of the fields |
|
next_execute_time |
output only field: when next backup will be executed |
DailyBackupSchedule
|
Field |
Description |
|
execute_time |
Required field. |
WeeklyBackupSchedule
|
Field |
Description |
|
days_of_week[] |
The number of elements must be in the range 1-7. |
DaysOfWeekBackupSchedule
|
Field |
Description |
|
days[] |
enum DayOfWeek The number of elements must be in the range 1-7.
|
|
execute_time |
Required field. |
RecurringBackupSchedule
|
Field |
Description |
|
start_time |
Required field. Timestamp of the first recurrence. |
|
recurrence |
string Required field. An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |