Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
Yandex Managed Service for YDB
  • Начало работы
  • Пошаговые инструкции
    • Обзор
    • Управление базами данных через консоль Yandex Cloud
    • Управление базами данных с помощью YC CLI
    • Подключение к БД с помощью YDB CLI
    • Управление таблицами и директориями
    • Чтение и запись данных
    • Мониторинг состояния базы данных
  • Практические руководства
    • Развертывание веб-приложения
    • Разработка Slack-бота
    • Подключение к YDB из функции Yandex Cloud Functions на Python
    • Подключение к базе данных YDB из функции Yandex Cloud Functions на Node.js
    • Конвертация видео в GIF на Python
    • Разработка навыка Алисы и сайта с авторизацией
    • Миграция базы данных из Yandex Managed Service for MySQL с помощью Yandex Data Transfer
  • Концепции
    • Обзор
    • Термины и определения
    • Режимы работы Serverless и Dedicated
    • Таблицы DynamoDB
    • Квоты и лимиты
  • Управление доступом
  • Правила тарификации
    • Обзор
    • Бессерверный режим
      • Правила тарификации для бессерверного режима
      • Стоимость запроса для YQL
      • Стоимость запроса для Document API
      • Стоимость запроса для специальных API
      • Стоимость операций с топиками
    • Режим с выделенными инстансами
  • Document API, совместимый с Amazon DynamoDB
    • Инструменты
      • Настройка инструментов AWS
      • Работа с данными через HTTP-интерфейс
      • Работа с AWS CLI
        • Обзор
        • Создание таблицы
        • Добавление данных в таблицу
        • Чтение данных из таблицы
        • Обновление данных
        • Выборка данных
        • Удаление созданных ресурсов
      • Работа с AWS SDK
        • Обзор
        • Создание таблицы
        • Загрузка данных в таблицу
        • Управление записями в таблице
          • Создание записи
          • Чтение записи
          • Обновление записи
          • Удаление записи
        • Поиск и извлечение данных
        • Удаление таблицы
    • Справочник Document API
      • Все методы
      • Actions
        • BatchGetItem
        • BatchWriteItem
        • CreateTable
        • DeleteItem
        • DeleteTable
        • DescribeTable
        • DescribeTimeToLive
        • GetItem
        • ListTables
        • PutItem
        • Query
        • Scan
        • TransactGetItems
        • TransactWriteItems
        • UpdateItem
        • UpdateTimeToLive
    • Общие ошибки при работе с Document API
  • Справочник API Yandex Cloud для Managed Service for YDB
    • Обзор
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • BackupService
      • DatabaseService
      • LocationService
      • ResourcePresetService
      • StorageTypeService
      • OperationService
    • REST (англ.)
      • Overview
      • Backup
        • Overview
        • delete
        • get
        • list
        • listPaths
      • Database
        • Overview
        • backup
        • create
        • delete
        • get
        • list
        • move
        • restore
        • start
        • stop
        • update
      • Location
        • Overview
        • get
        • list
      • ResourcePreset
        • Overview
        • get
        • list
      • StorageType
        • Overview
        • get
        • list
  • Вопросы и ответы
  • Публичные материалы
  1. Справочник API Yandex Cloud для Managed Service for YDB
  2. REST (англ.)
  3. Database
  4. backup

Managed Service for YDB API, REST: Database.backup

Статья создана
Yandex Cloud
  • HTTP request
  • Body parameters
  • Response

HTTP request

POST https://ydb.api.cloud.yandex.net/ydb/v1/databases:backup

Body parameters

{
  "databaseId": "string",
  "backupSettings": {
    "name": "string",
    "description": "string",
    "backupSchedule": {
      "nextExecuteTime": "string",

      // `backupSettings.backupSchedule` includes only one of the fields `dailyBackupSchedule`, `weeklyBackupSchedule`, `recurringBackupSchedule`
      "dailyBackupSchedule": {
        "executeTime": {
          "hours": "integer",
          "minutes": "integer",
          "seconds": "integer",
          "nanos": "integer"
        }
      },
      "weeklyBackupSchedule": {
        "daysOfWeek": [
          {
            "days": [
              "string"
            ],
            "executeTime": {
              "hours": "integer",
              "minutes": "integer",
              "seconds": "integer",
              "nanos": "integer"
            }
          }
        ]
      },
      "recurringBackupSchedule": {
        "startTime": "string",
        "recurrence": "string"
      },
      // end of the list of possible fields`backupSettings.backupSchedule`

    },
    "backupTimeToLive": "string",
    "sourcePaths": [
      "string"
    ],
    "sourcePathsToExclude": [
      "string"
    ],
    "type": "string",
    "storageClass": "string"
  }
}
Field Description
databaseId string
backupSettings object

custom backup options, if required.

backupSettings.
name
string

name of backup settings

The maximum string length in characters is 256.

backupSettings.
description
string

human readable description.

The maximum string length in characters is 256.

backupSettings.
backupSchedule
object

provide schedule. if empty, backup will be disabled.

backupSettings.
backupSchedule.
nextExecuteTime
string (date-time)

output only field: when next backup will be executed using provided schedule.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

backupSettings.
backupSchedule.
dailyBackupSchedule
object
backupSettings.backupSchedule includes only one of the fields dailyBackupSchedule, weeklyBackupSchedule, recurringBackupSchedule
backupSettings.
backupSchedule.
dailyBackupSchedule.
executeTime
object

Required.

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

backupSettings.
backupSchedule.
dailyBackupSchedule.
executeTime.
hours
integer (int32)

Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

backupSettings.
backupSchedule.
dailyBackupSchedule.
executeTime.
minutes
integer (int32)

Minutes of hour of day. Must be from 0 to 59.

backupSettings.
backupSchedule.
dailyBackupSchedule.
executeTime.
seconds
integer (int32)

Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

backupSettings.
backupSchedule.
dailyBackupSchedule.
executeTime.
nanos
integer (int32)

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

backupSettings.
backupSchedule.
weeklyBackupSchedule
object
backupSettings.backupSchedule includes only one of the fields dailyBackupSchedule, weeklyBackupSchedule, recurringBackupSchedule
backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[]
object

Required. The number of elements must be in the range 1-7.

backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
days[]
string

Required. The number of elements must be in the range 1-7.

  • MONDAY: The day-of-week of Monday.
  • TUESDAY: The day-of-week of Tuesday.
  • WEDNESDAY: The day-of-week of Wednesday.
  • THURSDAY: The day-of-week of Thursday.
  • FRIDAY: The day-of-week of Friday.
  • SATURDAY: The day-of-week of Saturday.
  • SUNDAY: The day-of-week of Sunday.
backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
executeTime
object

Required.

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
executeTime.
hours
integer (int32)

Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
executeTime.
minutes
integer (int32)

Minutes of hour of day. Must be from 0 to 59.

backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
executeTime.
seconds
integer (int32)

Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

backupSettings.
backupSchedule.
weeklyBackupSchedule.
daysOfWeek[].
executeTime.
nanos
integer (int32)

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

backupSettings.
backupSchedule.
recurringBackupSchedule
object
backupSettings.backupSchedule includes only one of the fields dailyBackupSchedule, weeklyBackupSchedule, recurringBackupSchedule
backupSettings.
backupSchedule.
recurringBackupSchedule.
startTime
string (date-time)

Required. Timestamp of the first recurrence.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

backupSettings.
backupSchedule.
recurringBackupSchedule.
recurrence
string

Required. An RRULE (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this backup reccurs. The FREQ values of MINUTELY, and SECONDLY are not supported.

backupSettings.
backupTimeToLive
string

provide time to live of backup.

backupSettings.
sourcePaths[]
string

provide a list of source paths. Each path can be directory, table or even database itself. Each directory (or database) will be traversed recursively and all childs of directory will be included to backup. By default, backup will be created for full database.

The maximum number of elements is 256.

backupSettings.
sourcePathsToExclude[]
string

provide a list of paths to exclude from backup. Each path is a directory, table, or database. Each directory (or database) will be traversed recursively and all childs of directory will be excluded.

The maximum number of elements is 256.

backupSettings.
type
string
backupSettings.
storageClass
string

Response

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": true,
  "metadata": "object",

  //  includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": "object",
  // 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.

createdAt string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

createdBy string

ID of the user or service account who initiated the operation.

modifiedAt string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done boolean (boolean)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadata object

Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.

error object
The error result of the operation in case of failure or cancellation.
includes only one of the fields error, response
error.
code
integer (int32)

Error code. An enum value of google.rpc.Code.

error.
message
string

An error message.

error.
details[]
object

A list of messages that carry the error details.

response object
includes only one of the fields error, response

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Была ли статья полезна?

Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Body parameters
  • Response