edbctl cluster v1.3.3

Manages database cluster resources. Use this command to create, edit, view, delete, and restore all types of clusters.

Commands

The edbctl cluster command has following options:

edbctl cluster list

Lists all active or deleted clusters. Use the [--deleted] flag to display deleted clusters. You can also filter results by cluster ID or architecture. When you provide the [--id] flag, detailed information about the cluster is displayed, including instance size, storage, and node count.

edbctl cluster list [--id] [--deleted] [options]

Where options are:

-i, --id string                     Cluster ID. Filter the list by a specific cluster ID.
-n, --name string                   Cluster name. Filter the list by a specific cluster name.
-d, --deleted                       The cluster is a deleted cluster.
-A, --cluster-architecture string   Cluster architecture ID. Filter the list by architecture (for example, single/ha).
-o, --output string                 table json yaml xml json-raw (default "table").
-c, --credential string             The credential that you created via `credential create` command. The default is fetched from `context_credential`
-P, --project string                The project that groups your clusters and other resources. The default is taken from `context_project`.
-h, --help                          Help for list.

Examples

edbctl cluster list
edbctl cluster list --id p-c5fh47nfjcg4ci71uv32
edbctl cluster list --deleted

edbctl cluster list-connection-info

Retrieves and displays the connection string for a specified Postgres cluster using its cluster ID. The output includes the read/write URI, database name, host, port, and user.

edbctl cluster list-connection-info {--id} [options]

Where options are:

  -i, --id string           Cluster ID (required). The unique identifier for the cluster to list connection string.
  -o, --output string       [table json yaml xml json-raw] (default "table")
  -c, --credential string   The credential that you created via `credential create` command. The default is fetched from `context_credential`.
  -P, --project string      The project that groups your clusters and other resources. the default is taken from `context_project`.
  -h, --help                Help for list-connection-info.

These examples show how to retrieve and display the connection strings for specific clusters:

edbctl cluster list-connection-info --id <pg_id>
edbctl cluster list-connection-info -i <pg_id>

edbctl cluster create

Creates a cluster using a specified configuration file.

This command provisions a new cluster based on the settings defined in a YAML configuration file. The file specifies key details such as:

  • Cluster Type: single, ha, pgd, aha, or analytics
  • PostgreSQL Configuration: pgConfig
  • Resource Allocation: storage, memory
  • Backup Settings
  • Image
edbctl cluster create [options]

Where options are:

-F, --config-file string   Path to the cluster config YAML file.
-c, --credential string    The credential that you created via the `credential create` command. The default is fetched from `context_credential`.
-h, --help                 Help for create.
-P, --project string       The project that groups your clusters and other resources. The default is taken from `context_project`.
-y, --yes                  Auto-confirm all confirmations.

This example shows how to create a PSR - Single Node cluster using sample YAML files:

edbctl cluster create -F <Sample YAML Configuration file for single node>
Sample YAML configuration file for single node:
# cluster details
clusterType: single # Required. Type of the cluster
tags: # Optional tags for the cluster with name and color(valid name or hex color code)
  - color: blue
    tagName: tag-1
clusterName: create-single-name # Required.
password: password@1234 # Required. Password must be 12 characters or more

# primary details
primaryPgName: Primary-Replica
imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
deploymentLocation: managed-devspatcher # Required.
networking: private # Required. Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
#image:  # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize: # Required.
  cpuCores: 1 # CPU must be between 0.1 and 15 Cores
  memoryGi: 1 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage: # Required.
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
#  passphrase: mypassphrase
#  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

# replica details
replicaClusters:
  - replicaPgName: replica-1
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #      url: docker.example.com/platform/example/postgres:latest
    #      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    #transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
    #  passphrase: mypassphrase
    #  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4
  - replicaPgName: replica-2 # Required.
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #     url: docker.example.com/platform/example/postgres:latest
    #     digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    #transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
    #  passphrase: mypassphrase
    #  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

This example shows how to create a PSR - High Availability cluster using a YAML configuration file:

edbctl cluster create -F <Sample YAML configuration file for High Availability>
Sample YAML Configuration file for High Availability:
# cluster details
clusterType: ha # Required. Type of the cluster
tags: # Optional tags for the cluster with name and color(valid name or hex color code)
  - color: blue
    tagName: tag-1
clusterName: create-ha-name # Required.
password: password@1234 # Required. Password must be 12 characters or more

# primary details
primaryPgName: Primary-Replica
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
standbyReplicas: 2 # Required for HA cluster
deploymentLocation: managed-devspatcher # Required.
networking: private # Required. Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize: # Required.
  cpuCores: 1 # CPU must be between 0.1 and 15 Cores
  memoryGi: 1 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage: # Required.
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
#  passphrase: mypassphrase
#  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

# replica details
replicaClusters:
  - replicaPgName: replica-1
    standbyReplicas: 2 # Required for HA cluster
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #      url: docker.example.com/platform/example/postgres:latest
    #      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    #transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
    #  passphrase: mypassphrase
    #  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4
  - replicaPgName: replica-2 # Required.
    standbyReplicas: 2 # Required for HA cluster
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #     url: docker.example.com/platform/example/postgres:latest
    #     digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    #transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
    #  passphrase: mypassphrase
    #  keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

This example shows how to create an analytics cluster using a sample YAML configuration file:

edbctl cluster create -F <Sample YAML configuration file for Analytics>
Sample YAML configuration file for Analytics:
clusterType: analytics # required, type of the cluster
tags: # Optional tags for the cluster with name and color(valid name or hex color code)
  - color: blue
    tagName: tag-1
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
clusterName: create-analytics-name # required
deploymentLocation: managed-devspatcher # required
password: password@1234 #Password must be 12 characters or more
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize: # Required
    cpuCores: 1 # CPU must be between 0.1 and 15 Cores
    memoryGi: 1 # Memory must be between 0.1 and 10 Gi

This example shows how to create a PGD cluster using a sample YAML configuration file:

edbctl cluster create -F <Sample YAML configuration file for PGD>
Sample YAML configuration file for PGD:
clusterType: pgd # Type of the cluster
tags: # Optional tags for the cluster with name and color(valid name or hex color code)
  - color: blue
    tagName: tag-1
clusterName: create-pgd-name # required
password: Password@1234 #Password must be 12 characters or more
dataGroups:
  - groupName: Data Group A # required
    deploymentLocation: managed-devspatcher # required
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
#    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#      - cidrBlock: 9.9.9.9/28
#        description: Allow traffic from App A
#      - cidrBlock: 10.10.10.10/27
#        description: Allow traffic from App B
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    nodes: 3 # Required. Only can be set to 2 or 3
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration:
      max_connections: 100
      max_locks_per_transaction: 64
    backupSchedule: 27 26 0 * * * # Required. Scheduled Backup Cron
    instanceSize: # Required
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.
    storage:
      databaseStorage: # Required
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). For PGD clusters, the recommended size is 10 Gi or more.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional, WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#    transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
#      passphrase: mypassphrase
#      keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

  - groupName: Data Group B
    deploymentLocation: managed-devspatcher # required
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
#    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#      - cidrBlock: 9.9.9.9/28
#        description: Allow traffic from App A
#      - cidrBlock: 10.10.10.10/27
#        description: Allow traffic from App B
    backupRetentionPeriod: 30d  # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    nodes: 3 # only can be set to 2 or 3
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration:
      max_connections: 100
      max_locks_per_transaction: 64
    backupSchedule: 6 27 0 * * * # Required. Scheduled Backup Cron
    instanceSize: # Required
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.
    storage:
      databaseStorage: # Required
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). For PGD clusters, the recommended size is 10 Gi or more.
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage: # Optional field, but default value is 1 Gi
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#    transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
#      passphrase: mypassphrase
#      keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4
witnessGroups:
  - groupName: Witness Group  # required
    deploymentLocation: managed-devspatcher # required
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    instanceSize:
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.

This example shows how to create an advanced high availability (AHA) cluster using a sample YAML configuration file:

edbctl cluster create -F <Sample YAML configuration file for AHA>
Sample YAML configuration file for AHA cluster:
clusterType: aha # required, type of the cluster
tags: # Optional tags for the cluster with name and color(valid name or hex color code)
  - color: blue
    tagName: tag-1
clusterName: create-aha-name # required
password: Password@1234 # Password must be 12 characters or more
dataGroup:
  deploymentLocation: managed-devspatcher # required
  groupName: Data Group A # required
  networking: private # Network access type for the cluster. Valid values: private, public
#  allowedIpRanges: # Optional, must contain at least one IP range with subnet mask when specified
#    - cidrBlock: 9.9.9.9/28
#      description: Allow traffic from App A
#    - cidrBlock: 10.10.10.10/27
#      description: Allow traffic from App B
  backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
  nodes: 3 # Required. Only can be set to 1, 2 or 3
  imageId: e791cfd57486281653d3d6135872125c # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
#  image: # only one of `imageId` or `image` should be set
#    url: docker.example.com/platform/example/postgres:latest
#    digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
  postgresqlConfiguration:
    max_connections: 100
    max_locks_per_transaction: 64
  backupSchedule: 27 26 0 * * * # Required. Scheduled Backup Cron
  instanceSize: # Required
      cpuCores: 2 # CPU must be between 0.1 and 47.51 Cores
      memoryGi: 2 # Memory must be between 0.1 and 178.51 Gi. For Aha clusters, the recommended memory is 2 Gi or more.
  storage:
    databaseStorage: # Required
      sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). For Aha clusters, the recommended size is 10 Gi or more.
      storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    walStorage:
      sizeGi: 20 # Size must be between 0 and Unlimited (0-Unlimited Gi)
      storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#  transparentDataEncryption: # Optional. Only one of passphrase or KeyId should be set, adds a layer of security by encrypting supported data stored at rest.
#    passphrase: mypassphrase
#    keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4

edbctl cluster edit

Edits an existing cluster using a YAML configuration file. This command allows you to modify cluster settings, database configurations, backup policies, extensions, and resource allocations.

edbctl cluster edit [options]

Where options are:

-F, --config-file string   Path to the cluster config YAML file.
-c, --credential string    The credential that you created via the `credential create`' command. The default is fetched from `context_credential`.
-h, --help                 Help for edit.
-P, --project string       The project that groups your clusters and other resources. The default is taken from `context_project`.
-y, --yes                  Auto-confirm all confirmations.

This example shows how to edit a cluster using a YAML configuration file:

Note

The following fields are mandatory:

  • clusterID
  • clusterType All the other fields are optional. If not provided, the values will not be changed.
edbctl cluster edit -F <Example YAML configuration file>
Example YAML configuration file:
clusterType: single # checks that cluster type is a single cluster, this can only be changed to ha
clusterId: p-abcdefg # cluster id of the cluster to be edited
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to preserve existing tags. 'tags' values will overwrite existing tags. set 'tags: []' to remove all tags.
  - color: blue
    tagName: production
  - color: green
    tagName: staging
  - color: red
    tagName: development
name: edit-single-name
primaryPgName: edited-primary-replica-name
imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
password: password@1234 #Password must be 12 characters or more
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: "192.168.1.0/24"
#    description: "Office network"
#  - cidrBlock: "10.0.0.0/16"
#    description: "VPN network"
backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 500
  shared_buffers: 256
  application_name: beaconator
backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
instanceSize:
  cpuCores: 4 # CPU must be between 0.1 and 15 Cores
  memoryGi: 16 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage:  # Primary Storage size in Gi
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
    storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
    storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
# to edit: if you provide a replica with a replicaPgId then that existing replica will be preserved/edited
# to add a replica: if you do provide a replica without a replicaPgId then a new replica will be created
# to remove a replica: if you do not provide a replica with a replicaPgId that exists then that existing replica will be removed
replicaClusters:
  # this is editing a replica cluster because it provides a replicaPgId
  - replicaPgId: p-abcdefg-b
    replicaPgName: test replica d
    imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags --location-id <location-id>`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
    #allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #  - cidrBlock: "192.168.1.0/24"
    #    description: "Office network"
    #  - cidrBlock: "10.0.0.0/16"
    #    description: "VPN network"
    backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    #image: # only one of `imageId` or `image` should be set
    #  url: docker.example.com/platform/example/postgres:latest
    #  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 500
      shared_buffers: 256
      application_name: beaconator
    backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
    instanceSize:
      cpuCores: 4 # CPU must be between 0.1 and 15 Cores
      memoryGi: 16 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage:  # Primary Storage size in Gi
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  # this is adding a new replica because it does not provide a replicaPgId
  - replicaPgName: test replica e
    locationId: managed-devspatcher
    imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags --location-id <location-id>`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
    #allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #  - cidrBlock: "192.168.1.0/24"
    #    description: "Office network"
    #  - cidrBlock: "10.0.0.0/16"
    #    description: "VPN network"
    backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    #image: # only one of `imageId` or `image` should be set
    #  url: docker.example.com/platform/example/postgres:latest
    #  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 500
      shared_buffers: 256
      application_name: beaconator
    backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
    instanceSize:
      cpuCores: 4 # CPU must be between 0.1 and 15 Cores
      memoryGi: 16 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage:  # Primary Storage size in Gi
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  # any replicas that are not provided with a replicaPgId will be removed

This example shows how to edit High Availability cluster using sample YAML files:

Note

The following fields are mandatory:

  • clusterID
  • clusterType

All the other fields are optional. If not provided, the values will not be changed.

Sample YAML configuration file for HA cluster:
clusterType: ha # checks that cluster type is a ha cluster, this can only be changed to single
clusterId: p-abcdefg # cluster id of the cluster to be edited
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to preserve existing tags. 'tags' values will overwrite existing tags. set 'tags: []' to remove all tags.
  - color: blue
    tagName: production
  - color: green
    tagName: staging
  - color: red
    tagName: development
name: edit-ha-name
imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
password: password@1234 #Password must be 12 characters or more
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: "192.168.1.0/24"
#    description: "Office network"
#  - cidrBlock: "10.0.0.0/16"
#    description: "VPN network"
backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 500
  shared_buffers: 256
  application_name: beaconator
backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
instanceSize:
  cpuCores: 4 # CPU must be between 0.1 and 15 Cores
  memoryGi: 16 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage:  # Primary Storage size in Gi
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
    storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
    storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
# to edit: if you provide a replica with a replicaPgId then that existing replica will be preserved/edited
# to add a replica: if you do provide a replica without a replicaPgId then a new replica will be created
# to remove a replica: if you do not provide a replica with a replicaPgId that exists then that existing replica will be removed
standbyReplicas: 3          # for HA cluster
replicaClusters:
  # this is editing a replica cluster because it provides a replicaPgId
  - replicaPgId: p-abcdefg-b
    replicaPgName: test replica d
    imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags --location-id <location-id>`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
    #allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #  - cidrBlock: "192.168.1.0/24"
    #    description: "Office network"
    #  - cidrBlock: "10.0.0.0/16"
    #    description: "VPN network"
    backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    #image: # only one of `imageId` or `image` should be set
    #  url: docker.example.com/platform/example/postgres:latest
    #  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 500
      shared_buffers: 256
      application_name: beaconator
    backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
    instanceSize:
      cpuCores: 4 # CPU must be between 0.1 and 15 Cores
      memoryGi: 16 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage:  # Primary Storage size in Gi
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    standbyReplicas: 3          # for HA cluster
  # this is adding a new replica because it does not provide a replicaPgId
  - replicaPgName: test replica e
    locationId: managed-devspatcher
    imageId: 6535c8bc9e358f0afaf5a706ea1bc722 # Image ID can be fetched with command `edbctl image list-image-tags --location-id <location-id>`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
    #allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #  - cidrBlock: "192.168.1.0/24"
    #    description: "Office network"
    #  - cidrBlock: "10.0.0.0/16"
    #    description: "VPN network"
    backupRetentionPeriod: 40d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    #image: # only one of `imageId` or `image` should be set
    #  url: docker.example.com/platform/example/postgres:latest
    #  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 500
      shared_buffers: 256
      application_name: beaconator
    backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
    instanceSize:
      cpuCores: 4 # CPU must be between 0.1 and 15 Cores
      memoryGi: 16 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage:  # Primary Storage size in Gi
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    standbyReplicas: 3          # for HA cluster
  # any replicas that are not provided with a replicaPgId will be removed

This example shows how to edit an analytics cluster using a sample YAML configuration file:

Note

The following fields are mandatory:

  • clusterID
  • clusterType

All the other fields are optional. If not provided, the values will not be changed.

Sample YAML configuration file for Analytics:
clusterType: analytics # checks that cluster type is an analytics cluster, cannot change this field
clusterId: p-pd6kf9unmi # required, cluster ID of the cluster to be edited
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to preserve existing tags. 'tags' values will overwrite existing tags. set 'tags: []' to remove all tags.
  - color: blue
    tagName: production
  - color: green
    tagName: staging
  - color: red
    tagName: development
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
name: edit-analytics-name
password: password@1234 #Password must be 12 characters or more
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 192.168.1.0/24
#    description: Office network
#  - cidrBlock: 10.0.0.0/16
#    description: VPN network
backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 0 6 * * *   # Scheduled Backup Time in Cron format (UTC)
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
  max_locks_per_transaction: 64
instanceSize:
    cpuCores: 4 # CPU must be between 0.1 and 15 Cores
    memoryGi: 16 # Memory must be between 0.1 and 10 Gi

This example shows how to edit a PGD cluster using a sample YAML configuration file:

Note

The fields clusterType and clusterId are mandatory The logic for forming the YAML file is as follows:

  • If you mention just groupId, then the group will be retained.
  • If you mention the groupId along with some fields, then the group will be retained and updated with the given values.
  • If you don't give a groupId and add other details, such as groupName, image, etc., then that group will be added.
  • If you don't mention any groupId, then the group will be deleted.
Sample YAML configuration file for PGD:
clusterType: pgd # checks that cluster type is a pgd cluster, cannot change this field
clusterId: p-12345abcde
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to preserve existing tags. 'tags' values will overwrite existing tags. set 'tags: []' to remove all tags.
  - color: blue
    tagName: tag-1
name: edit-pgd-name
password: Password@1234
dataGroups:
  # add new data group A
  - groupName: Data Group A # required
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    networking: private # Network access type for the cluster. Valid values: private, public
#    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#      - cidrBlock: 9.9.9.9/28
#        description: Allow traffic from App A
#      - cidrBlock: 10.10.10.10/27
#        description: Allow traffic from App B
    backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    nodes: 2 # only can be set to 2 or 3
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
      max_locks_per_transaction: 64
    backupSchedule: 0 4 8 * * * # Scheduled Backup Cron
    instanceSize:
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.
    storage:
      databaseStorage: # Size must be between 0 and Unlimited (0-Unlimited Gi)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). For PGD clusters, the recommended size is 10 Gi or more. Size needs to be the same or greater than the existing databaseStorage size.
      walStorage: # Optional, WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  - groupId: p-12345abcde-x
    networking: private # Network access type for the cluster. Valid values: private, public
    groupName: Data Group B # required
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
#    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#      - cidrBlock: 9.9.9.9/28
#        description: Allow traffic from App A
#      - cidrBlock: 10.10.10.10/27
#        description: Allow traffic from App B
    backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    nodes: 2 # only can be set to 2 or 3
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
      max_locks_per_transaction: 64
    backupSchedule: 0 4 8 * * * # Scheduled Backup Cron
    instanceSize:
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.
    storage:
      databaseStorage:
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing databaseStorage size.
      walStorage: # Optional, WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). Size needs to be the same or greater than the existing walStorage size.
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
witnessGroups:
  # add new witness group
  - groupName: Witness Group A # required when adding a new witness group
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    instanceSize:
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.

This example that shows how to edit a PGD cluster while retaining group using a sample YAML configuration file:

Second sample YAML configuration file for PGD:
clusterType: pgd # checks that cluster type is a pgd cluster, cannot change this field
clusterId: p-12345abcde # this will ensure the cluster will be retained
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to preserve existing tags. 'tags' values will overwrite existing tags. set 'tags: []' to remove all tags.
  - color: blue
    tagName: tag-1
name: edit-pgd-name
password: Password@1234 #Password must be 12 characters or more
dataGroups:
  - groupId: p-12345abcde-a # this will ensure the group will be retained
  - groupId: p-12345abcde-b
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
witnessGroups: # this will ensure the witness group will be retained
  - groupId: p-12345abcde-c
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    groupName: Witness Group JFK
#    image: # only one of `imageId` or `image` should be set, should match the image of the data group
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    instanceSize:
        cpuCores: 2 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.

edbctl cluster delete

Deletes a specified cluster using its cluster ID. This action permanently removes the cluster from your project and can't be undone, so ensure you have the correct cluster ID before proceeding.

edbctl cluster delete [options]

Where options are:

-i, --id string           Cluster ID (required). The unique identifier for the cluster to delete.
-c, --credential string   The credential that you created via the `credential create` command. The default is fetched from `context_credential`.
-y, --yes                 Auto-confirm all confirmations.
-P, --project string      The project that groups your clusters and other resources, the default is taken from `context_project`.
-h, --help                Help for delete

These examples show how to delete the cluster:

edbctl cluster delete
edbctl cluster delete --id p-8nllnskncq
edbctl cluster delete -i p-8nllnskncq

edbctl cluster restore

You can restore a cluster by providing a YAML configuration file with the required specifications. Use the cluster restore command and pass the file using the --file or -f option. While restoring, you must specify one of the following restore modes:

  • full
  • pointInTime

Make sure you uncomment only one mode at a time.

Note

The restoreRequest and password fields are mandatory for all clusters except PGD and AHA. All other fields are optional and default to the values from the source cluster if not specified.

edbctl cluster restore [options]

Where options are:

-F, --config-file string   Path to the cluster config YAML file (required).
-c, --credential string    The credential that you created via the `credential create` command. The default is fetched from `context_credential`.
-y, --yes                  Auto-confirm all confirmations.
-P, --project string       The project that groups your clusters and other resources. The default is taken from `context_project`.
-h, --help                 Help for restore.

This example shows how to restore a single cluster using a YAML configuration file:

Note

The following fields are mandatory:

  • clusterType
  • restoreRequest
  • password

All the other primary cluster fields are optional. If not provided, then will use the source values. Replica details can be added as needed, but are not mandatory.

edbctl cluster restore -F restore-single.yaml
restore-single.yaml
clusterType: single # checks that cluster type is a single cluster, this can only be changed to ha
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to use source cluster tags. 'tags' values will use exactly these tags only. set 'tags: []' to use no tags.
  - color: blue
    tagName: tag-1
clusterName: restore-single-name
restoreRequest:
  # only one of the fields 'full' or 'pointInTime' can be set
  full:
    postgresBackupId: 20241112T211900
    sourceClusterId: p-12345abcde
  #  pointInTime:
  #    pointInTime: '2025-01-01T13:40:04.000Z'
  #    sourceClusterId: p-12345abcde

# primary replica details
primaryPgName:  Primary Cluster # Required.
deploymentLocation: managed-devspatcher
password: password@1234 #Password must be 12 characters or more
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Scheduled Backup Cron
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize:
    cpuCores: 1 # CPU must be between 0.1 and 15 Cores
    memoryGi: 1 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage:
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
#  passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
#  #keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS

# replica details
replicaClusters:
  - replicaPgName: replica-1
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #      url: docker.example.com/platform/example/postgres:latest
    #      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 1 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
      passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
      #keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS

This example shows how to restore a high availability cluster using a YAML configuration file:

Note

The following fields are mandatory:

  • clusterType
  • restoreRequest
  • password

All the other primary cluster fields are optional. If not provided, then will use the source values. Replica details can be added as needed, but are not mandatory.

edbctl cluster restore -F restore-ha.yaml
restore-ha.yaml
clusterType: ha # checks that cluster type is a ha cluster, this can only be changed to single
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to use source cluster tags. 'tags' values will use exactly these tags only. set 'tags: []' to use no tags.
  - color: blue
    tagName: tag-1
clusterName: restore-ha-name
restoreRequest:
  # only one of the fields 'full' or 'pointInTime' can be set
  full:
    postgresBackupId: 20241112T211900
    sourceClusterId: p-12345abcde
  #  pointInTime:
  #    pointInTime: '2025-01-01T13:40:04.000Z'
  #    sourceClusterId: p-12345abcde

# primary replica details
primaryPgName:  Primary Cluster # Required.
deploymentLocation: managed-devspatcher
password: password@1234 #Password must be 12 characters or more
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Scheduled Backup Cron
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize:
    cpuCores: 1 # CPU must be between 0.1 and 15 Cores
    memoryGi: 1 # Memory must be between 0.1 and 10 Gi
storage:
  databaseStorage:
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  walStorage:   # Optional field. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads) (Optional)
    sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
    storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
#  passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
#  #keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS
standbyReplicas: 2 # for HA cluster

# replica details
replicaClusters:
  - replicaPgName: replica-1
    imageId: 3e2af4f1dba3b9f8fb2bb6ae4834a5bd # Image ID can be fetched with command `edbctl image list-image-tags`
    deploymentLocation: managed-devspatcher # Required.
    networking: private # Required. Network access type for the cluster. Valid values: private, public
    #    allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
    #      - cidrBlock: 127.0.0.1/24
    #        description: test
    backupRetentionPeriod: 30d # Required. Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    backupSchedule: 39 13 23 * * * # Required. Scheduled Backup Cron
    #    image: # only one of `imageId` or `image` should be set
    #      url: docker.example.com/platform/example/postgres:latest
    #      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
    instanceSize: # Required.
      cpuCores: 1 # CPU must be between 0.1 and 15 Cores
      memoryGi: 1 # Memory must be between 0.1 and 10 Gi
    storage:
      databaseStorage: # Required.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional. WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs (Recommended for high write workloads)
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
#    transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
#      passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
#      #keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS
    standbyReplicas: 2 # Required for HA cluster

This example shows how to restore an analytics cluster using a YAML configuration file:

Note

The following fields are mandatory:

  • clusterType
  • restoreRequest
  • password

All the other cluster fields are optional. If not provided, then will use the source values.

edbctl cluster restore -F restore-analytics.yaml
restore-analytics.yaml
clusterType: analytics # checks that cluster type is a analytics cluster, cannot change this field
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to use source cluster tags. 'tags' values will use exactly these tags only. set 'tags: []' to use no tags.
  - color: blue
    tagName: tag-1
clusterName: restore-analytics-name
deploymentLocation: managed-devspatcher
password: password@1234 #Password must be 12 characters or more
imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
restoreRequest:
# only one of the fields 'full' or 'pointInTime' can be set
  full:
    postgresBackupId: 20241112T211900
    sourceClusterId: p-12345abcde
  #  pointInTime:
  #    pointInTime: '2025-01-01T13:40:04.000Z'
  #    sourceClusterId: p-12345abcde
networking: private # Network access type for the cluster. Valid values: private, public
#allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#  - cidrBlock: 127.0.0.1/24
#    description: test
backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
backupSchedule: 39 13 23 * * * # Scheduled Backup Cron
#image: # only one of `imageId` or `image` should be set
#  url: docker.example.com/platform/example/postgres:latest
#  digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
postgresqlConfiguration: # Optional
  max_connections: 100
instanceSize:
    cpuCores: 1 # CPU must be between 0.1 and 15 Cores
    memoryGi: 1 # Memory must be between 0.1 and 10 Gi

This example shows how to define the configuration for a PGD cluster in a restore operation using a YAML configuration file:

Note

The following fields are mandatory:

  • sourceClusterID
  • clusterType
  • password
  • dataGroups
  • restorePgdGroupRequest

All the other fields are optional. If omitted, the values from the source cluster are used.

edbctl cluster restore -F restore-pgd.yaml
restore-pgd.yaml
clusterType: pgd # checks that cluster type is a pgd cluster, cannot change this field
sourceClusterId: p-12345abcde # required
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to use source cluster tags. 'tags' values will use exactly these tags only. set 'tags: []' to use no tags.
  - color: blue
    tagName: tag-1
name: restore-pgd-name
password: Password@1234 #Password must be 12 characters or more
dataGroups: # Currently, only one data group can be restored at a time
  - groupName: Data Group A
    imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
    deploymentLocation: managed-devspatcher
    networking: private # Network access type for the cluster. Valid values: private, public
    backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
    nodes: 2 # only can be set to 2 or 3
#    image: # only one of `imageId` or `image` should be set
#      url: docker.example.com/platform/example/postgres:latest
#      digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
    postgresqlConfiguration: # Optional
      max_connections: 100
      max_locks_per_transaction: 64
    backupSchedule: 0 4 8 * * * # Scheduled Backup Cron
    restorePgdGroupRequest:
      full: # for pointInTime restore mode use the pointInTime configuration as below and comment out the full configuration
        postgresBackupId: 20241228T055553
        sourceGroupId: p-12345abcde-b
      # pointInTime:
      #   pointInTime: '2025-01-01T13:40:04.000Z'
      #   sourceGroupId: p-12345abcde-b
    instanceSize:
        cpuCores: 1 # CPU must be between 0.1 and 15 Cores
        memoryGi: 2 # Memory must be between 0.1 and 10 Gi. For PGD clusters, the recommended memory is 2 Gi or more.
    storage:
      databaseStorage:
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi). For PGD clusters, the recommended size is 10 Gi or more.
        storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
      walStorage:   # Optional, WAL Storage size in Gi, a separate storage volume for Write-Ahead Logs.
        sizeGi: 10 # Size must be between 0 and Unlimited (0-Unlimited Gi)
        storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
      passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
#      keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS

This example shows how to define the configuration for AHA cluster in restore operation using a YAML configuration file:

Note

The following fields are mandatory:

  • sourceClusterID
  • clusterType
  • password
  • dataGroups
  • restoreAhagroupRequest

All the other fields are optional. If omitted, the values from the source cluster are used.

edbctl cluster restore -F restore-aha.yaml
restore-aha.yaml
clusterType: aha # checks that cluster type is a aha cluster, cannot change this field
sourceClusterId: p-12345abcde # required
tags: # Optional tags for the cluster with name and color(valid name or hex color code). Remove 'tags' to use source cluster tags. 'tags' values will use exactly these tags only. set 'tags: []' to use no tags.
  - color: blue
    tagName: tag-1
name: restore-aha-name
password: Password@1234 #Password must be 12 characters or more
dataGroup:
  groupName: Data Group A
  imageId: 6138b8f8e2293a87ebf7ba8dfd1f74da # Image ID can be fetched with command `edbctl image list-image-tags`, only one of `imageId` or `image` should be set
  deploymentLocation: managed-devspatcher
  networking: private # Network access type for the cluster. Valid values: private, public
#  allowedIpRanges: # Must contain at least one IP range with subnet mask when specified
#    - cidrBlock: 9.9.9.9/28
#      description: Allow traffic from App A
#    - cidrBlock: 10.10.10.10/27
#      description: Allow traffic from App B
  backupRetentionPeriod: 30d # Retention period must be between 1-180 days, 1-25 weeks, or 1-6 months. Valid units: days(d),weeks(w),months(m)
  nodes: 2 # only can be set to 2 or 3
#  image: # only one of `imageId` or `image` should be set
#    url: docker.example.com/platform/example/postgres:latest
#    digest: sha256:dummyhash1234567890abcdef1234567890abcdef1234567890abcdef1234567890
  postgresqlConfiguration: # Optional
    max_connections: 100
    max_locks_per_transaction: 64
  backupSchedule: 0 4 8 * * * # Scheduled Backup Cron
  restoreAhaGroupRequest:
    #full: # for pointInTime restore mode use the pointInTime configuration as below and comment out the full configuration
    #  postgresBackupId: 20241228T055553
     pointInTime:
       pointInTime: '2025-01-01T13:40:04.000Z'
  instanceSize:
      cpuCores: 2 # CPU must be between 0.1 and 47.51 Cores
      memoryGi: 2 # Memory must be between 0.1 and 178.51 Gi. For Aha clusters, the recommended memory is 2 Gi or more.
  storage:
    databaseStorage:
      sizeGi: 20 # Size must be between 0 and Unlimited (0-Unlimited Gi). For Aha clusters, the recommended size is 10 Gi or more.
      storageClass: ssd-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
    walStorage:
      sizeGi: 20 # Size must be between 0 and Unlimited (0-Unlimited Gi)
      storageClass: standard-csi # Supported storage classes can be fetched with command `edbctl image list-image-tags` and checking `Supported Storage Classes` field
  transparentDataEncryption: # Optional. Only one of passphrase or keyId should be set. If TDE is enabled on source cluster, configuration must match source or provide passphrase.
    passphrase: mypassphrase # Required if source cluster uses TDE with passphrase
    #keyId: 42c4f77e-3ebe-46ab-9749-4178887bded4 # Uses KMS key from source if source cluster uses KMS

edbctl cluster switchover-primary

The edbctl cluster switchover-primary command performs a controlled role swap within a database cluster. It promotes a designated Replica to become the new Primary node while simultaneously demoting the current Primary to a Replica role. This is typically used for planned maintenance, performance optimization, or data center migration.

edbctl cluster switchover-primary [options]

Where options are:

-i, --id string                 The unique ID of the cluster to switchover (required).
    --replica-id string         The unique ID of the replica node to promote to Primary (required).
-P, --project string            The project context for the operation. Defaults to `context_project`.
    --credential string         The credential to use for authentication. Defaults to `context_credential`.
-y, --yes                       Auto-confirms all prompts and confirmations, enabling non-interactive operation.
-h, --help                      Displays help information for the switchover-primary command.