Skip to main content

List

Retrieves a list of backups.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListBackupsRequest =
cloudApi.mdb.clickhouse_backup_service.ListBackupsRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.BackupServiceClient);

const result = await client.list(
ListBackupsRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();

ListBackupsRequest

folderId : string
pageSize : int64

The maximum number of results per page that should be returned. If the number of available results is larger than page_size, the service returns a next_page_token that can be used to get the next page of results in subsequent ListBackups requests. Acceptable values are 0 to 1000, inclusive. Default value: 100.

pageToken : string

Page token. Set page_token to the next_page_token returned by a previous ListBackups request to get the next page of results.

ListBackupsResponse

backups : Backup
nextPageToken : string

This token allows you to get the next page of results for ListBackups requests, if the number of results is larger than page_size specified in the request. To get the next page, specify the value of next_page_token as a value for the page_token parameter in the next ListBackups request. Subsequent ListBackups requests will have their own next_page_token to continue paging through the results.

Backup

Status

id of backup

  • STATUS_UNSPECIFIED

    id of backup

  • CREATING

    id of backup

  • READY

    id of backup

  • ERROR

    id of backup

  • CANCELLED

    id of backup

Type
  • TYPE_UNSPECIFIED

  • SYSTEM

    indicates that backup started by the system.

  • USER

id : string
name : string

human readable backup name.

folderId : string
databaseId : string
description : string

description of backup.

createdAt : google.protobuf.Timestamp
startedAt : google.protobuf.Timestamp

indicates when backup started.

completedAt : google.protobuf.Timestamp

indicates when backup completed.

status : Status
backupSettings : BackupSettings

settings used to make backup.

type : Type
size : int64

size of backup in bytes.

BackupSettings

Type
  • TYPE_UNSPECIFIED

  • SYSTEM

  • USER

StorageClass
  • STORAGE_CLASS_UNSPECIFIED

  • STANDARD

  • REDUCED_REDUNDANCY

  • STANDARD_IA

  • ONEZONE_IA

  • INTELLIGENT_TIERING

  • GLACIER

  • DEEP_ARCHIVE

  • OUTPOSTS

name : string

name of backup settings

description : string

human readable description.

backupSchedule : BackupSchedule

provide schedule. if empty, backup will be disabled.

backupTimeToLive : google.protobuf.Duration

provide time to live of backup.

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.

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.

type : Type
storageClass : StorageClass

BackupSchedule

One of policy

  • dailyBackupSchedule : DailyBackupSchedule
  • weeklyBackupSchedule : WeeklyBackupSchedule
  • recurringBackupSchedule : RecurringBackupSchedule
nextExecuteTime : google.protobuf.Timestamp

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

DailyBackupSchedule

executeTime : google.type.TimeOfDay

WeeklyBackupSchedule

daysOfWeek : DaysOfWeekBackupSchedule

RecurringBackupSchedule

startTime : google.protobuf.Timestamp

Timestamp of the first recurrence.

recurrence : string

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.

DaysOfWeekBackupSchedule

days : google.type.DayOfWeek
executeTime : google.type.TimeOfDay