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

# POST /v1/{+parent}/backups

`POST /v1/{+parent}/backups`

Creates a new Backup in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `backupId` string
- `requestId` string
- `validateOnly` boolean

## Request body

- Backup — Message describing Backup object
  - `state` 'STATE_UNSPECIFIED' | 'READY' | 'CREATING' | 'FAILED' | 'DELETING' — Output only. The current state of the backup.
  - `displayName` string — User-settable and human-readable display name for the Backup.
  - `clusterName` string — Required. The full resource name of the backup source cluster (e.g., projects/{project}/locations/{region}/clusters/{cluster_id}).
  - `sizeBytes` string, int64 — Output only. The size of the backup in bytes.
  - `databaseVersion` 'DATABASE_VERSION_UNSPECIFIED' | 'POSTGRES_13' | 'POSTGRES_14' | 'POSTGRES_15' | 'POSTGRES_16' | 'POSTGRES_17' | 'POSTGRES_18' — Output only. The database engine major version of the cluster this backup was created from. Any restored cluster created from this backup will have the same database version.
  - `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.
  - `clusterUid` string — Output only. The system-generated UID of the cluster which was used to create this resource.
  - `expiryTime` string, google-datetime — Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's create_time.
  - `satisfiesPzs` boolean — Output only. Reserved for future use.
  - `createCompletionTime` string, google-datetime — Output only. Timestamp when the resource finished being created.
  - `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.
  - `etag` string — For Resource freshness validation (https://google.aip.dev/154)
  - `tags` object — Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: ``` "123/environment": "production", "123/costCenter": "marketing" ```
  - `description` string — User-provided description of the backup.
  - `reconciling` boolean — Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance.
  - `deleteTime` string, google-datetime — Output only. Delete time stamp
  - `annotations` object — Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
  - `name` string — Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backup_id} where the cluster and backup ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the backup resource name is the name of the parent resource: * projects/{project}/locations/{region}
  - `updateTime` string, google-datetime — Output only. Update time stamp Users should not infer any meaning from this field. Its value is generally unrelated to the timing of the backup creation operation.
  - `createTime` string, google-datetime — Output only. Create time stamp
  - `labels` object — Labels as key value pairs
  - `type` 'TYPE_UNSPECIFIED' | 'ON_DEMAND' | 'AUTOMATED' | 'CONTINUOUS' — The backup type, which suggests the trigger for the backup.
  - `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]
  - `expiryQuantity` QuantityBasedExpiry — A backup's position in a quantity-based retention queue, of backups with the same source cluster and type, with length, retention, specified by the backup's retention policy. Once the position is greater than the retention, the backup is eligible to be garbage collected. Example: 5 backups from the same source cluster and type with a quantity-based retention of 3 and denoted by backup_id (position, retention). Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3). Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
    - `totalRetentionCount` integer — Output only. The length of the quantity-based queue, specified by the backup's retention policy.
    - `retentionCount` integer — Output only. The backup's position among its backups with the same source cluster and type, by descending chronological order create time(i.e. newest first).

## 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)
