---
title: "POST /v1/{+parent}/clusters:restore"
method: POST
path: "/v1/{+parent}/clusters:restore"
tags: ["projects"]
---

# POST /v1/{+parent}/clusters:restore

`POST /v1/{+parent}/clusters:restore`

Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.

## Path parameters

- `parent` string, required

## Request body

- RestoreClusterRequest — Message for restoring a Cluster from a backup or another cluster at a given point in time. NEXT_ID: 11
  - `backupSource` BackupSource — Message describing a BackupSource.
    - `backupUid` string — Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted.
    - `backupName` string — Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id}
  - `backupdrPitrSource` BackupDrPitrSource — Message describing a BackupDrPitrSource.
    - `pointInTime` string, google-datetime — Required. The point in time to restore to.
    - `dataSource` string — Required. The name of the backup resource with the format: * projects/{project}/locations/{location}/backupVaults/{backupvault_id}/dataSources/{datasource_id}
  - `cluster` Cluster — A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.
    - `backupdrInfo` BackupDrInfo — Information about BackupDR protection for this cluster.
      - `previousWindows` BackupDrEnabledWindow[] — Windows during which BackupDR was enabled for this cluster, along with associated configuration for that window. These are used to determine points-in-time for which restores can be performed. The windows are ordered with the most recent window last. Windows are mutally exclusive. Windows which closed more than 1 year ago will be removed from this list.
        - `dataSource` string — The DataSource resource that represents the cluster in BackupDR.
        - `continuousBackupPreviouslyEnabledTime` string, google-datetime — The time when continuous backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `disabledTime` string, google-datetime — Time when the BackupDR protection for this cluster was disabled. This field will be empty if this BackupDR window is the `current_window`.
        - `continuousBackupPreviouslyEnabled` boolean — Whether continuous backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `enabledTime` string, google-datetime — Time when the BackupDR protection for this cluster was enabled.
        - `continuousBackupPreviousRecoveryWindowDays` integer — The retention set for the continuous backup that was previously enabled prior to enabling BackupDR protection for this cluster.
        - `automatedBackupPreviouslyEnabled` boolean — Whether automated backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `backupPlanAssociation` string — The BackupPlanAssociation resource that was used to enable BackupDR protection for this cluster.
        - `logRetentionPeriod` string, google-duration — The retention period for logs generated by BackupDR for this cluster.
      - `currentWindow` BackupDrEnabledWindow — Information about a single window when BackupDR was enabled for this cluster.
        - `dataSource` string — The DataSource resource that represents the cluster in BackupDR.
        - `continuousBackupPreviouslyEnabledTime` string, google-datetime — The time when continuous backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `disabledTime` string, google-datetime — Time when the BackupDR protection for this cluster was disabled. This field will be empty if this BackupDR window is the `current_window`.
        - `continuousBackupPreviouslyEnabled` boolean — Whether continuous backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `enabledTime` string, google-datetime — Time when the BackupDR protection for this cluster was enabled.
        - `continuousBackupPreviousRecoveryWindowDays` integer — The retention set for the continuous backup that was previously enabled prior to enabling BackupDR protection for this cluster.
        - `automatedBackupPreviouslyEnabled` boolean — Whether automated backup was previously enabled prior to enabling BackupDR protection for this cluster.
        - `backupPlanAssociation` string — The BackupPlanAssociation resource that was used to enable BackupDR protection for this cluster.
        - `logRetentionPeriod` string, google-duration — The retention period for logs generated by BackupDR for this cluster.
    - `databaseVersion` 'DATABASE_VERSION_UNSPECIFIED' | 'POSTGRES_13' | 'POSTGRES_14' | 'POSTGRES_15' | 'POSTGRES_16' | 'POSTGRES_17' | 'POSTGRES_18' — Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.
    - `network` string — Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: `projects/{project}/global/networks/{network_id}`. This is required to create a cluster. Deprecated, use network_config.network instead.
    - `maintenanceUpdatePolicy` MaintenanceUpdatePolicy — MaintenanceUpdatePolicy defines the policy for system updates.
      - `maintenanceWindows` MaintenanceWindow[] — Preferred windows to perform maintenance. Currently limited to 1.
        - `day` 'DAY_OF_WEEK_UNSPECIFIED' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY' — Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc.
        - `startTime` GoogleTypeTimeOfDay — 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`.
          - `minutes` integer — Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
          - `seconds` integer — Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
          - `hours` integer — Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
          - `nanos` integer — Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
      - `denyMaintenancePeriods` DenyMaintenancePeriod[] — Periods to deny maintenance. Currently limited to 1.
        - `time` GoogleTypeTimeOfDay — 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`.
          - `minutes` integer — Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
          - `seconds` integer — Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
          - `hours` integer — Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
          - `nanos` integer — Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
        - `startDate` GoogleTypeDate — Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
          - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          - `day` integer — Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
        - `endDate` GoogleTypeDate — Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
          - `month` integer — Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
          - `day` integer — Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
          - `year` integer — Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    - `encryptionInfo` EncryptionInfo — EncryptionInfo describes the encryption information of a cluster or a backup.
      - `encryptionType` 'TYPE_UNSPECIFIED' | 'GOOGLE_DEFAULT_ENCRYPTION' | 'CUSTOMER_MANAGED_ENCRYPTION' — Output only. Type of encryption.
      - `kmsKeyVersions` string[] — Output only. Cloud KMS key versions that are being used to protect the database or the backup.
    - `subscriptionType` 'SUBSCRIPTION_TYPE_UNSPECIFIED' | 'STANDARD' | 'TRIAL' — Optional. Subscription type of the cluster.
    - `tags` object — Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: ``` "123/environment": "production", "123/costCenter": "marketing" ```
    - `reconciling` boolean — Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Cluster does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance.
    - `automatedBackupPolicy` AutomatedBackupPolicy — Message describing the user-specified automated backup policy. All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.
      - `timeBasedRetention` TimeBasedRetention — A time based retention policy specifies that all backups within a certain time period should be retained.
        - `retentionPeriod` string, google-duration — The retention period.
      - `enabled` boolean — Whether automated automated backups are enabled. If not set, defaults to true.
      - `labels` object — Labels to apply to backups created using this configuration.
      - `encryptionConfig` EncryptionConfig — EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
        - `kmsKeyName` string — The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
      - `location` string — The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster.
      - `backupWindow` string, google-duration — The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it defaults to 1 hour.
      - `weeklySchedule` WeeklySchedule — A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week. The weekly schedule message is flexible and can be used to create many types of schedules. For example, to have a daily backup that starts at 22:00, configure the `start_times` field to have one element "22:00" and the `days_of_week` field to have all seven days of the week.
        - `startTimes` GoogleTypeTimeOfDay[] — The times during the day to start a backup. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are provided, a single fixed start time is chosen arbitrarily.
          - `minutes` integer — Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.
          - `seconds` integer — Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.
          - `hours` integer — Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
          - `nanos` integer — Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.
        - `daysOfWeek` string[] — The days of the week to perform a backup. If this field is left empty, the default of every day of the week is used.
      - `quantityBasedRetention` QuantityBasedRetention — A quantity based policy specifies that a certain number of the most recent successful backups should be retained.
        - `count` integer — The number of backups to retain.
    - `cloudsqlBackupRunSource` CloudSQLBackupRunSource — The source CloudSQL backup resource.
      - `project` string — The project ID of the source CloudSQL instance. This should be the same as the AlloyDB cluster's project.
      - `instanceId` string — Required. The CloudSQL instance ID.
      - `backupRunId` string, int64 — Required. The CloudSQL backup run ID.
    - `deleteTime` string, google-datetime — Output only. Delete time stamp
    - `name` string — Output only. The name of the cluster resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression `[a-z0-9-]+`. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: * projects/{project}/locations/{region}
    - `backupSource` BackupSource — Message describing a BackupSource.
      - `backupUid` string — Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted.
      - `backupName` string — Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id}
    - `createTime` string, google-datetime — Output only. Create time stamp
    - `continuousBackupInfo` ContinuousBackupInfo — ContinuousBackupInfo describes the continuous backup properties of a cluster.
      - `encryptionInfo` EncryptionInfo — EncryptionInfo describes the encryption information of a cluster or a backup.
        - `encryptionType` 'TYPE_UNSPECIFIED' | 'GOOGLE_DEFAULT_ENCRYPTION' | 'CUSTOMER_MANAGED_ENCRYPTION' — Output only. Type of encryption.
        - `kmsKeyVersions` string[] — Output only. Cloud KMS key versions that are being used to protect the database or the backup.
      - `schedule` string[] — Output only. Days of the week on which a continuous backup is taken.
      - `earliestRestorableTime` string, google-datetime — Output only. The earliest restorable time that can be restored to. If continuous backups and recovery was recently enabled, the earliest restorable time is the creation time of the earliest eligible backup within this cluster's continuous backup recovery window. After a cluster has had continuous backups enabled for the duration of its recovery window, the earliest restorable time becomes "now minus the recovery window". For example, assuming a point in time recovery is attempted at 04/16/2025 3:23:00PM with a 14d recovery window, the earliest restorable time would be 04/02/2025 3:23:00PM. This field is only visible if the CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided.
      - `enabledTime` string, google-datetime — Output only. When ContinuousBackup was most recently enabled. Set to null if ContinuousBackup is not enabled.
    - `labels` object — Labels as key value pairs
    - `continuousBackupConfig` ContinuousBackupConfig — ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.
      - `enabled` boolean — Whether ContinuousBackup is enabled.
      - `recoveryWindowDays` integer — The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days.
      - `encryptionConfig` EncryptionConfig — EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
        - `kmsKeyName` string — The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
    - `pscConfig` PscConfig — PscConfig contains PSC related configuration at a cluster level.
      - `pscEnabled` boolean — Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance.
      - `serviceOwnedProjectNumber` string, int64 — Output only. The project number that needs to be allowlisted on the network attachment to enable outbound connectivity.
    - `networkConfig` NetworkConfig — Metadata related to network configuration.
      - `network` string — Optional. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: `projects/{project_number}/global/networks/{network_id}`. This is required to create a cluster.
      - `allocatedIpRange` string — Optional. Name of the allocated IP range for the private IP AlloyDB cluster, for example: "google-managed-services-default". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. Field name is intended to be consistent with Cloud SQL.
    - `encryptionConfig` EncryptionConfig — EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
      - `kmsKeyName` string — The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
    - `displayName` string — User-settable and human-readable display name for the Cluster.
    - `primaryConfig` PrimaryConfig — Configuration for the primary cluster. It has the list of clusters that are replicating from this cluster. This should be set if and only if the cluster is of type PRIMARY.
      - `secondaryClusterNames` string[] — Output only. Names of the clusters that are replicating from this cluster.
    - `maintenanceVersionSelectionPolicy` 'MAINTENANCE_VERSION_SELECTION_POLICY_UNSPECIFIED' | 'MAINTENANCE_VERSION_SELECTION_POLICY_LATEST' | 'MAINTENANCE_VERSION_SELECTION_POLICY_DEFAULT' — Input only. Policy to use to automatically select the maintenance version to which to update the cluster's instances.
    - `state` 'STATE_UNSPECIFIED' | 'READY' | 'STOPPED' | 'EMPTY' | 'CREATING' | 'DELETING' | 'FAILED' | 'BOOTSTRAPPING' | 'MAINTENANCE' | 'PROMOTING' | 'SWITCHOVER' — Output only. The current serving state of the cluster.
    - `uid` string — Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.
    - `migrationSource` MigrationSource — Subset of the source instance configuration that is available when reading the cluster resource.
      - `referenceId` string — Output only. Place holder for the external source identifier(e.g DMS job name) that created the cluster.
      - `hostPort` string — Output only. The host and port of the on-premises instance in host:port format
      - `sourceType` 'MIGRATION_SOURCE_TYPE_UNSPECIFIED' | 'DMS' — Output only. Type of migration source.
    - `maintenanceSchedule` MaintenanceSchedule — MaintenanceSchedule stores the maintenance schedule generated from the MaintenanceUpdatePolicy, once a maintenance rollout is triggered, if MaintenanceWindow is set, and if there is no conflicting DenyPeriod. The schedule is cleared once the update takes place. This field cannot be manually changed; modify the MaintenanceUpdatePolicy instead.
      - `startTime` string, google-datetime — Output only. The scheduled start time for the maintenance.
    - `satisfiesPzs` boolean — Output only. Reserved for future use.
    - `secondaryConfig` SecondaryConfig — Configuration information for the secondary cluster. This should be set if and only if the cluster is of type SECONDARY.
      - `primaryClusterName` string — The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}
    - `etag` string — For Resource freshness validation (https://google.aip.dev/154)
    - `sslConfig` SslConfig — SSL configuration.
      - `sslMode` 'SSL_MODE_UNSPECIFIED' | 'SSL_MODE_ALLOW' | 'SSL_MODE_REQUIRE' | 'SSL_MODE_VERIFY_CA' | 'ALLOW_UNENCRYPTED_AND_ENCRYPTED' | 'ENCRYPTED_ONLY' — Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.
      - `caSource` 'CA_SOURCE_UNSPECIFIED' | 'CA_SOURCE_MANAGED' — Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is supported currently, and is the default value.
    - `trialMetadata` TrialMetadata — Contains information and all metadata related to TRIAL clusters.
      - `endTime` string, google-datetime — End time of the trial cluster.
      - `upgradeTime` string, google-datetime — Upgrade time of trial cluster to Standard cluster.
      - `startTime` string, google-datetime — start time of the trial cluster.
      - `graceEndTime` string, google-datetime — grace end time of the cluster.
    - `clusterType` 'CLUSTER_TYPE_UNSPECIFIED' | 'PRIMARY' | 'SECONDARY' — Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`
    - `annotations` object — Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
    - `dataplexConfig` DataplexConfig — Configuration for Dataplex integration.
      - `enabled` boolean — Dataplex is enabled by default for resources such as clusters and instances. This flag controls the integration of AlloyDB PG resources (like databases, schemas, and tables) with Dataplex."
    - `initialUser` UserPassword — The username/password for a database user. Used for specifying initial users at cluster creation time.
      - `user` string — The database username.
      - `password` string — The initial password for the user.
    - `backupdrBackupSource` BackupDrBackupSource — Message describing a BackupDrBackupSource.
      - `backup` string — Required. The name of the backup resource with the format: * projects/{project}/locations/{location}/backupVaults/{backupvault_id}/dataSources/{datasource_id}/backups/{backup_id}
    - `updateTime` string, google-datetime — Output only. Update time stamp
  - `validateOnly` boolean — Optional. If set, performs request validation, for example, permission checks and any other type of validation, but does not actually execute the create request.
  - `continuousBackupSource` ContinuousBackupSource — Message describing a ContinuousBackupSource.
    - `cluster` string — Required. The source cluster from which to restore. This cluster must have continuous backup enabled for this operation to succeed. For the required format, see the comment on the Cluster.name field.
    - `pointInTime` string, google-datetime — Required. The point in time to restore to.
  - `backupdrBackupSource` BackupDrBackupSource — Message describing a BackupDrBackupSource.
    - `backup` string — Required. The name of the backup resource with the format: * projects/{project}/locations/{location}/backupVaults/{backupvault_id}/dataSources/{datasource_id}/backups/{backup_id}
  - `requestId` string — Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  - `clusterId` string — Required. ID of the requesting object.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/alloydb.md) · [All operations](https://skmtc.net/google/apis/alloydb/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/alloydb/versions/cdbec2e3108c/schema)
