Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Router
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Managed Service for YDB
    • SpeechKit
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • Container Registry
    • Managed Service for Prometheus®
    • Message Queue
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Cloud Apps
    • Yandex AI Studio
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Yandex Cloud Video
    • Stackland
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • DataSphere
    • Vision OCR
    • Translate
    • Cloud Registry
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Managed Service for GitLab
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • IoT Core
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
  • Статус работы сервисов
  • Marketplace
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
  • Кейсы
  • Документация
  • Блог
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Yandex Managed Service for Sharded PostgreSQL
RU
  • Начало работы
  • Управление доступом
  • Инспекции и рекомендации
  • Правила тарификации
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • AddSubcluster
        • Start
        • Stop
        • Move
        • Backup
        • Restore
        • RescheduleMaintenance
        • ListLogs
        • StreamLogs
        • ListOperations
        • ListBackups
        • ListHosts
        • AddHosts
        • UpdateHosts
        • DeleteHosts
        • ResetupHosts
        • GetShard
        • ListShards
        • AddShard
        • DeleteShard
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
  • Метрики Monitoring
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

В этой статье:

  • gRPC request
  • RestoreClusterRequest
  • ConfigSpec
  • SpqrSpec
  • Router
  • RouterSettings
  • Resources
  • Coordinator
  • CoordinatorSettings
  • PostgreSQL
  • PostgreSQLSettings
  • Infra
  • BalancerSettings
  • Access
  • HostSpec
  • MDBPostgreSQL
  • MaintenanceWindows
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceSchedule
  • MaintenanceWindowSlot
  • operation.Operation
  1. Справочник API
  2. gRPC (англ.)
  3. Cluster
  4. Restore

Managed Service for SPQR API, gRPC: ClusterService.Restore

Статья создана
Yandex Cloud
Обновлена 7 октября 2026 г.
Открыть в Markdown
  • gRPC request
  • RestoreClusterRequest
  • ConfigSpec
  • SpqrSpec
  • Router
  • RouterSettings
  • Resources
  • Coordinator
  • CoordinatorSettings
  • PostgreSQL
  • PostgreSQLSettings
  • Infra
  • BalancerSettings
  • Access
  • HostSpec
  • MDBPostgreSQL
  • MaintenanceWindows
  • AnytimeMaintenanceWindow
  • WeeklyMaintenanceSchedule
  • MaintenanceWindowSlot
  • operation.Operation

Creates a new SPQR cluster using the specified backup.

gRPC requestgRPC request

rpc Restore (RestoreClusterRequest) returns (operation.Operation)

RestoreClusterRequestRestoreClusterRequest

{
  "backup_id": "string",
  "name": "string",
  "description": "string",
  "labels": "map<string, string>",
  "environment": "Environment",
  "config_spec": {
    "spqr_spec": {
      "router": {
        "config": {
          "show_notice_messages": "google.protobuf.BoolValue",
          "time_quantiles": [
            "double"
          ],
          "default_route_behavior": "DefaultRouteBehavior",
          "prefer_same_availability_zone": "google.protobuf.BoolValue",
          "enhanced_multishard_processing": "google.protobuf.BoolValue",
          "default_target_session_attrs": "TargetSessionAttrs",
          "default_commit_strategy": "CommitStrategy",
          "allow_postprocessing": "google.protobuf.BoolValue",
          "auto_route_ro_on_standby": "google.protobuf.BoolValue"
        },
        "resources": {
          "resource_preset_id": "string",
          "disk_size": "int64",
          "disk_type_id": "string"
        }
      },
      "coordinator": {
        "config": {
          "iteration_timeout": "google.protobuf.Duration",
          "lock_iteration_timeout": "google.protobuf.Duration",
          "router_keepalive_time": "google.protobuf.Duration",
          "router_keepalive_timeout": "google.protobuf.Duration",
          "etcd_max_send_bytes": "google.protobuf.Int64Value",
          "etcd_max_txn_ops": "google.protobuf.Int64Value"
        },
        "resources": {
          "resource_preset_id": "string",
          "disk_size": "int64",
          "disk_type_id": "string"
        }
      },
      "postgresql": {
        "config": "PostgreSQLSettings",
        "resources": {
          "resource_preset_id": "string",
          "disk_size": "int64",
          "disk_type_id": "string"
        }
      },
      "infra": {
        "resources": {
          "resource_preset_id": "string",
          "disk_size": "int64",
          "disk_type_id": "string"
        },
        "router": {
          "show_notice_messages": "google.protobuf.BoolValue",
          "time_quantiles": [
            "double"
          ],
          "default_route_behavior": "DefaultRouteBehavior",
          "prefer_same_availability_zone": "google.protobuf.BoolValue",
          "enhanced_multishard_processing": "google.protobuf.BoolValue",
          "default_target_session_attrs": "TargetSessionAttrs",
          "default_commit_strategy": "CommitStrategy",
          "allow_postprocessing": "google.protobuf.BoolValue",
          "auto_route_ro_on_standby": "google.protobuf.BoolValue"
        },
        "coordinator": {
          "iteration_timeout": "google.protobuf.Duration",
          "lock_iteration_timeout": "google.protobuf.Duration",
          "router_keepalive_time": "google.protobuf.Duration",
          "router_keepalive_timeout": "google.protobuf.Duration",
          "etcd_max_send_bytes": "google.protobuf.Int64Value",
          "etcd_max_txn_ops": "google.protobuf.Int64Value"
        }
      },
      "console_password": "string",
      "log_level": "LogLevel",
      "balancer": {
        "cpu_threshold": "google.protobuf.DoubleValue",
        "space_threshold": "google.protobuf.DoubleValue",
        "stat_interval_sec": "google.protobuf.Int64Value",
        "max_move_count": "google.protobuf.Int64Value",
        "keys_per_move": "google.protobuf.Int64Value",
        "timeout": "google.protobuf.Int64Value"
      },
      "use_spqrguard": "google.protobuf.BoolValue",
      "forbid_direct_shard_queries": "google.protobuf.BoolValue"
    },
    "backup_window_start": "google.type.TimeOfDay",
    "backup_retain_period_days": "google.protobuf.Int64Value",
    "access": {
      "data_lens": "bool",
      "web_sql": "bool",
      "data_transfer": "bool",
      "serverless": "bool"
    },
    "sox_audit": "google.protobuf.BoolValue"
  },
  "host_specs": [
    {
      "zone_id": "string",
      "subnet_id": "string",
      "assign_public_ip": "bool",
      "type": "Type",
      "shard_name": "string",
      "mdb_postgresql": {
        "cluster_id": "string"
      }
    }
  ],
  "network_id": "string",
  "folder_id": "string",
  "security_group_ids": [
    "string"
  ],
  "deletion_protection": "bool",
  "time": "google.protobuf.Timestamp",
  "time_inclusive": "bool",
  "maintenance_windows": {
    // Includes only one of the fields `anytime`, `weekly_maintenance_schedule`
    "anytime": "AnytimeMaintenanceWindow",
    "weekly_maintenance_schedule": {
      "slots": [
        {
          "day": "DayOfWeek",
          "start_time": "google.type.TimeOfDay",
          "duration": "google.protobuf.Duration",
          "allow_temporary_unavailability": "bool"
        }
      ]
    }
    // end of the list of possible fields
  }
}

Field

Description

backup_id

string

Required field. ID of the backup to create a cluster from.
To get the backup ID, use a ClusterService.ListBackups request.

name

string

Required field. Name of the new SPQR cluster. The name must be unique within the folder.
The name can't be changed after the SPQR cluster is created.

The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

description

string

Description of the new SPQR cluster.

The maximum string length in characters is 256.

labels

object (map<string, string>)

Custom labels for the SPQR cluster as key:value pairs. Maximum 64 per resource.
For example, "project": "mvp" or "source": "dictionary".

The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\@0-9a-z]*. Each value must match the regular expression [-_./\@0-9a-z]*. No more than 64 per resource.

environment

enum Environment

Required field. Deployment environment of the new SPQR cluster.

  • PRODUCTION: Stable environment with a conservative update policy: only hotfixes
    are applied during regular maintenance.
  • PRESTABLE: Environment with a more aggressive update policy: new versions
    are rolled out irrespective of backward compatibility.

config_spec

ConfigSpec

Required field. Configuration for the SPQR cluster to be created.

host_specs[]

HostSpec

Configurations for SPQR hosts that should be created for
the cluster that is being created from the backup.

The number of elements must be greater than 0.

network_id

string

Required field. ID of the network to create the SPQR cluster in.

The maximum string length in characters is 150.

folder_id

string

Required. ID of the folder to create the SPQR cluster in.

The maximum string length in characters is 50.

security_group_ids[]

string

User security groups

deletion_protection

bool

Deletion Protection inhibits deletion of the cluster

time

google.protobuf.Timestamp

Timestamp of the moment to which the SPQR cluster should be restored.

time_inclusive

bool

Flag that indicates whether a database should be restored to the first backup point
available just after the timestamp specified in the time field instead of just before.
Possible values:

  • false (default) - the restore point refers to the first backup moment before time.
  • true - the restore point refers to the first backup point after time.

maintenance_windows

MaintenanceWindows

Maintenance windows for the cluster.

ConfigSpecConfigSpec

Field

Description

spqr_spec

SpqrSpec

Configuration and resource allocation for a SPQR Beta cluster.

backup_window_start

google.type.TimeOfDay

Time to start the daily backup, in the UTC timezone.

backup_retain_period_days

google.protobuf.Int64Value

Retain period of automatically created backup in days

access

Access

Access policy to DB

sox_audit

google.protobuf.BoolValue

Configuration setting which enables/disables SOX audit.

SpqrSpecSpqrSpec

Field

Description

router

Router

Configuration and resource allocation for SPQR Router hosts.

coordinator

Coordinator

Configuration and resource allocation for SPQR Coordinator hosts.

postgresql

PostgreSQL

Configuration and resource allocation for PostgreSQL hosts.

infra

Infra

Configuration and resource allocation for SPQR Infra (router+coordinator) hosts.

console_password

string

Password of the SPQR console.

log_level

enum LogLevel

  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • FATAL

balancer

BalancerSettings

Configuration for SPQR Balancer.

use_spqrguard

google.protobuf.BoolValue

forbid_direct_shard_queries

google.protobuf.BoolValue

RouterRouter

Field

Description

config

RouterSettings

Configuration for router hosts.

resources

Resources

Resources allocated to each host.

RouterSettingsRouterSettings

Configuration of a SPQR router.

Field

Description

show_notice_messages

google.protobuf.BoolValue

time_quantiles[]

double

default_route_behavior

enum DefaultRouteBehavior

  • BLOCK
  • ALLOW

prefer_same_availability_zone

google.protobuf.BoolValue

enhanced_multishard_processing

google.protobuf.BoolValue

default_target_session_attrs

enum TargetSessionAttrs

  • READ_WRITE
  • SMART_READ_WRITE
  • READ_ONLY
  • PREFER_STANDBY
  • ANY

default_commit_strategy

enum CommitStrategy

  • BEST_EFFORT
  • ONE_PC
  • TWO_PC

allow_postprocessing

google.protobuf.BoolValue

auto_route_ro_on_standby

google.protobuf.BoolValue

ResourcesResources

Field

Description

resource_preset_id

string

ID of the preset for computational resources available to a host (CPU, memory etc.).
All available presets are listed in the documentation.

disk_size

int64

Volume of the storage available to a host, in bytes.

disk_type_id

string

Type of the storage environment for the host.
Possible values:

  • network-hdd - network HDD drive,
  • network-ssd - network SSD drive,
  • local-ssd - local SSD storage.

CoordinatorCoordinator

Field

Description

config

CoordinatorSettings

Configuration for coordinator hosts.

resources

Resources

Resources allocated to each host.

CoordinatorSettingsCoordinatorSettings

Configuration of a SPQR coordinator.

Field

Description

iteration_timeout

google.protobuf.Duration

lock_iteration_timeout

google.protobuf.Duration

router_keepalive_time

google.protobuf.Duration

router_keepalive_timeout

google.protobuf.Duration

etcd_max_send_bytes

google.protobuf.Int64Value

etcd_max_txn_ops

google.protobuf.Int64Value

PostgreSQLPostgreSQL

Field

Description

config

PostgreSQLSettings

Configuration for PostgreSQL hosts.

resources

Resources

Resources allocated to each host.

PostgreSQLSettingsPostgreSQLSettings

Configuration of a PostgreSQL.

Field

Description

Empty

InfraInfra

Field

Description

resources

Resources

Resources allocated to each host

router

RouterSettings

Router related configuration

coordinator

CoordinatorSettings

Coordinator related configuration

BalancerSettingsBalancerSettings

Field

Description

cpu_threshold

google.protobuf.DoubleValue

space_threshold

google.protobuf.DoubleValue

stat_interval_sec

google.protobuf.Int64Value

max_move_count

google.protobuf.Int64Value

keys_per_move

google.protobuf.Int64Value

timeout

google.protobuf.Int64Value

AccessAccess

Field

Description

data_lens

bool

Allow access for DataLens.

web_sql

bool

Allow access for Web SQL.

data_transfer

bool

Allow access for DataTransfer.

serverless

bool

Allow access for Serverless.
NOTE: Do not propagate to public API until Serverless integration is required.

HostSpecHostSpec

Field

Description

zone_id

string

ID of the availability zone where the host resides.
To get a list of available zones, use the yandex.cloud.compute.v1.ZoneService.List request.

The maximum string length in characters is 50.

subnet_id

string

ID of the subnet that the host should belong to. This subnet should be a part
of the network that the cluster belongs to.
The network ID is set in the Cluster.network_id field.

The maximum string length in characters is 50.

assign_public_ip

bool

Whether the host should get a public IP address on creation.
After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign
a public IP to a host without one, recreate the host with assign_public_ip set as needed.
Possible values:

  • false - don't assign a public IP to the host.
  • true - the host should have a public IP address.

type

enum Type

Required field. Type of the host to be deployed.

  • ROUTER: A SPQR Router host.
  • COORDINATOR: A SPQR Coordinator host.
  • INFRA: A SPQR Infra host (router+coordinator)
  • POSTGRESQL: A PostgreSQL host.
  • EXTERNAL_POSTGRESQL: An External PostgreSQL host.
  • MDB_POSTGRESQL: A Managed PostgreSQL host

shard_name

string

Name of the shard that the host belongs to.
If empty, host doesn't belong to any shard

The maximum string length in characters is 63. Value must match the regular expression [a-zA-Z0-9_-]*.

mdb_postgresql

MDBPostgreSQL

MDBPostgreSQLMDBPostgreSQL

TODO move to hosts.proto when it's created
Configuration for MDB PostgreSQL host

Field

Description

cluster_id

string

Required field.

MaintenanceWindowsMaintenanceWindows

Maintenance windows shared by all managed database services.

Field

Description

anytime

AnytimeMaintenanceWindow

Maintenance operations can be scheduled anytime.

Includes only one of the fields anytime, weekly_maintenance_schedule.

weekly_maintenance_schedule

WeeklyMaintenanceSchedule

Maintenance operations can be scheduled during the specified weekly slots.

Includes only one of the fields anytime, weekly_maintenance_schedule.

AnytimeMaintenanceWindowAnytimeMaintenanceWindow

Field

Description

Empty

WeeklyMaintenanceScheduleWeeklyMaintenanceSchedule

Field

Description

slots[]

MaintenanceWindowSlot

Weekly time slots during which maintenance operations can be scheduled.
At least one slot is required.

The number of elements must be greater than 0.

MaintenanceWindowSlotMaintenanceWindowSlot

Field

Description

day

enum DayOfWeek

Day of the week.

  • 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.

start_time

google.type.TimeOfDay

Required field. Start time in UTC.

duration

google.protobuf.Duration

Required field. Slot duration.

allow_temporary_unavailability

bool

Allows maintenance operations that may cause temporary write unavailability.

operation.Operationoperation.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

google.protobuf.Timestamp

Creation timestamp.

created_by

string

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

modified_at

google.protobuf.Timestamp

The time when the Operation resource was last modified.

done

bool

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

google.protobuf.Any

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

google.rpc.Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

google.protobuf.Any

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.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

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

Предыдущая
Backup
Следующая
RescheduleMaintenance
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»