Skip to main content

Get

Returns the specified backup.

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

const GetBackupRequest =
cloudApi.mdb.clickhouse_backup_service.GetBackupRequest;

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

const result = await client.get(
GetBackupRequest.fromPartial({
backupId: "backupId",
})
);
console.log(result);
})();

GetBackupRequest

backupId : string

Required. ID of the YDB backup.

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