> 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/restore-from-backup.md).

# Restore a PostgreSQL Cluster

With <code class="expression">space.vars.ionos\_cloud</code> DBaaS, you can roll back a PostgreSQL cluster to a previous point in time using point-in-time recovery (PITR). This prevents data loss in unexpected situations such as accidental data deletion.

{% hint style="info" %}
**Note:** You can restore only one backup at a time. You must wait for the current restoration to complete before initiating another.
{% endhint %}

{% hint style="info" %}
**Prerequisites:**

* The backup must belong to the PostgreSQL cluster to be restored.
* The backup must be active. Inactive backups are not eligible for restoration.
* The cluster must be in the **AVAILABLE** state.
  {% endhint %}

To restore a cluster from a backup, 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/kShhzpBmdcvlCT5rsnct)
{% endstep %}

{% step %}

## Open the Backups tab

In the cluster details page, select **Backups**.

The **Point-in-time recovery** section displays the earliest backup available for restoration.

![Point-in-time recovery](/files/gl5GiMcLA1zJdmfgw9Cx)

2\. Select **Restore backup** to open the restore dialog.
{% endstep %}

{% step %}

## Set the recovery target time

In the **Restore backup** dialog, the **Earliest recovery target time** is displayed. Each backup has a recovery window defined by an earliest and a latest recovery target time. You can restore the backup to any point within this range.

1\. Click the date and time field and enter a recovery target time. Select a date and time from the calendar. Only dates within the available backup window are selectable.

{% hint style="info" %}
**Note:** The backup is replayed up to the specified timestamp. If left empty, the latest available backup is applied completely.
{% endhint %}

![Select recovery date and time](/files/8DVXHW8qbcHXU3tvIkP6)

2\. Select **Restore** to start the restoration.

{% hint style="success" %}
**Result:** The cluster's **STATE** is set to **UPDATING** while the restoration is in progress. Once complete, the cluster returns to **AVAILABLE**.
{% endhint %}
{% endstep %}
{% endstepper %}

## Next steps

* [<mark style="color:blue;">View Cluster Details</mark>](/cloud/databases/postgresql/how-tos/v2/view-postgresql-cluster-details.md): Verify the restored cluster's state and configuration.
* [<mark style="color:blue;">Clone a PostgreSQL Cluster</mark>](/cloud/databases/postgresql/how-tos/v2/clone-postgresql-cluster.md): Create a new cluster from a backup of the restored 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/restore-from-backup.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.
