> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/databases/postgresql/how-tos/v2/clone-postgresql-cluster.md).

# Clone a PostgreSQL Cluster

You can create a new PostgreSQL cluster from a backup of an existing one. Unlike v1, the PostgreSQL v2 does not have a dedicated clone operation; cloning is performed through the standard create cluster flow with a backup restore payload `restoreFromBackup`. The new cluster is pre-filled with the source cluster's configuration, which you can adjust before saving.

{% hint style="info" %}
**Note:** If you set a **Recover target time**, the backup is replayed up to that point in time (PITR). If left empty, the full backup is applied.
{% endhint %}

To clone a cluster, follow these steps:

{% stepper %}
{% step %}

## Navigate to the cluster

1\. In the **DCD**, go to **Menu** > **Databases** > **PostgreSQL**.

A list of all PostgreSQL clusters is displayed.

2\. Select a cluster from the list by clicking on its name. Alternatively, click **Details** in the **OPTIONS** column.

![Select a PostgreSQL cluster](/files/80LFqG8ixHv9XOpvkliy)

3\. In the cluster details page, click **Clone**.

![Clone a cluster](/files/Q8AMi4POIH7F741Sqsi0)
{% endstep %}

{% step %}

## Define clone properties

In the **Properties** section, specify the following:

1\. **Cluster Name:** Enter a name for the cloned cluster. By default, the name is set to **name-of-the-original-cluster-clone**. The name can contain a maximum of 63 characters, including letters, numbers, spaces, slashes, dashes, underscores, and dots.

2\. **Location:** Select the region where the cloned cluster will be deployed. In v2, each cluster is bound to a region-specific API endpoint, so the location determines which endpoint manages the cluster, and affects latency for all cluster operations.

![Define clone properties](/files/Ak2HqgnPGOgwHOytmn4R)
{% endstep %}

{% step %}

## Select the source backup

In the **Create from backup** section, select the backup the new cluster will be created from:

1\. **Backup cluster:** Select a backup from the drop-down list.

2\. **Recover target time:** Select a date and time to restore the cluster to a specific point in time.

![Create from backup](/files/VxCmbhbL0Y0ijSeXQk80)
{% endstep %}

{% step %}

## Configure the cluster

In the **Cluster configuration** section, review and adjust the inherited settings as needed:

1\. **PostgreSQL Version:** Select a PostgreSQL version from the drop-down list. You can only upgrade to a higher version; downgrades are not supported.

2\. **Instances:** Enter the number of instances for the cluster. We recommend a minimum of 3 instances for production usage.

3\. **Synchronization mode:** Select the replication mode from the drop-down list:

* **Asynchronous:** Transactions are committed without waiting for replicas to confirm. Offers better performance but may result in a small amount of data loss during failover.
* **Synchronous:** Each transaction waits for confirmation from at least one replica before committing. Ensures no data loss on failover at the cost of some latency.

4\. **Connection pooler:** Select the connection pooler mode from the drop-down list to manage client connections to the database. Select **Disabled** if connection pooling is not required.

5\. **Backup location:** Select the region where cluster backups will be stored. We recommend selecting a backup location different from the primary location to enhance data safety.

6\. **Backup retention (days):** Enter the number of days backups are retained. The valid range is 1–365 days.

![Clone cluster configuration](/files/nifUPUoducjDyDVyhnYN)
{% endstep %}

{% step %}

## Configure instances

In the **Instance configuration** section, adjust the resources allocated per instance:

1\. **Number of CPUs (per instance):** Use the slider to set the number of CPU cores per instance.

2\. **RAM Size (per instance):** Use the slider to set the amount of RAM per instance.

3\. **Storage Size:** Enter the storage size in GB. For optimal performance, we recommend setting the storage size to 100 GB.

{% hint style="info" %}
**Note:** The **Current availability** panel on the right displays the total resources currently in use and the limits available in your contract for CPU, RAM, and storage.
{% endhint %}

{% hint style="info" %}
**Note:** PostgreSQL v2 clusters use **SSD Premium** storage exclusively. HDD and SSD Standard storage types available in v1 are not supported in v2.
{% endhint %}

![Clone cluster configure instances](/files/hP5t2p0G0VsgV3dVw0yr)
{% endstep %}

{% step %}

## Configure the network

In the **Network configuration** section, provide the network details for the cloned cluster:

1\. **Virtual Data Center:** Select a datacenter from the available list.

2\. **VDC LAN:** Select a LAN for your datacenter.

3\. **IP/Subnet:** Enter the private IP address and subnet for the cluster.

{% hint style="info" %}
**Note:** Make sure the selected private IP address is not already in use within the DCD.
{% endhint %}

![Clone cluster network configuration](/files/hmcZVsiC2WH58PjqCdOL)
{% endstep %}

{% step %}

## Set the maintenance window

In the **Maintenance period (optional)** section, you can set a maintenance day and time:

1\. **Day:** Select a day from the drop-down list. 2. **Start Time (UTC):** Enter a time using the pre-defined format (hh:mm). The maintenance window covers a 4-hour period from the selected start time.

{% hint style="info" %}
**Note:** If no maintenance period is specified, maintenance can occur any time from Monday to Friday, 7 AM–5 PM.
{% endhint %}

![Clone cluster maintenance window](/files/WF0QkiuQXyABeFVLxojp)
{% endstep %}

{% step %}

## Configure Observability

In the **Observability** section, you can allow the following:

1\. **Enable logs:** Turn-on to forward cluster logs to your logging endpoint.

2\. **Enable metrics:** Turn-on to forward cluster metrics to your monitoring endpoint.

{% hint style="info" %}
**Note:** Enabling observability (logs and metrics) may incur additional costs on your bill. Observability services must be activated for your contract before logs and metrics can be collected. To activate the Observability service, see [<mark style="color:blue;">Central Logging</mark>](/cloud/observability/logging-service/dcd-how-tos/central-logging.md) and [<mark style="color:blue;">Central Monitoring</mark>](/cloud/observability/monitoring-service/dcd-how-tos/central-monitoring.md).
{% endhint %}

![Clone cluster observability](/files/B2h7SMucrtdQ7McSScF7)
{% endstep %}

{% step %}

## Create the database user

In the **User Creation** section, provide the following details:

1\. **Username:** Enter a username for the PostgreSQL cluster. The username must be between 1 and 63 characters and contain only lowercase letters, numbers, or hyphens. It must start and end with a lowercase letter.

2\. **Password:** Enter a password for the respective user.

3\. **Database Name:** Enter a name for the initial database to be created in the cluster.

{% hint style="warning" %}
**Important:** If the user already exists in the backup, its credentials will be overwritten.
{% endhint %}

![Clone cluster user creation](/files/1qscaiahTjIfELfbXhBS)
{% endstep %}

{% step %}

## Save the clone

Review the **Estimated costs** displayed at the bottom of the page, then click **Save** to create the cloned cluster.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
**Result:** The cloned cluster is created. Its **STATE** is set to **PROVISIONING** while the cloning process is in progress. Once complete, the cluster returns to **AVAILABLE**.
{% endhint %}

![Clone cluster provisioning](/files/05sndvkmpEpgl1xOSa5t)

## Next steps

* [<mark style="color:blue;">Restore from Backup</mark>](/cloud/databases/postgresql/how-tos/v2/restore-from-backup.md): Restore the cloned cluster to a previous state using an available backup.
* [<mark style="color:blue;">View Cluster Metrics</mark>](/cloud/databases/postgresql/how-tos/v2/view-postgresql-cluster-metrics.md): Monitor the performance of your cloned cluster.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/databases/postgresql/how-tos/v2/clone-postgresql-cluster.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
