---
title: "Backups and Point-In-Time Recovery"
description: "How Managed PostgreSQL backs up your data, how many backups each plan keeps, and why point-in-time recovery creates a new service."
url: https://community.exoscale.com/product/dbaas/service-specific/postgresql/overview/backups-and-pitr/
product: "PostgreSQL"
section: product
last_updated: 2026-11-10
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Backups and Point-In-Time Recovery

This page explains how Exoscale Managed PostgreSQL protects your data, and what point-in-time recovery means on the platform: creating a new service from a moment in the past, never rewinding the service you already have.

## Base Backups Plus Continuous WAL Archiving

Two mechanisms run on every service, on every plan:

- **Base backups**: a daily physical copy of the database cluster.
- **WAL archiving**: the write-ahead log is shipped off the node continuously.

Together they allow point-in-time recovery: restore the base backup taken before the target
moment, then replay the archived WAL up to that moment. A fork from the latest state contains every
transaction committed before the fork was requested, including those made after the last base
backup.

The first base backup is taken while a new service is being created, so a service is covered as
soon as it is `running`.

## Backup Cadence and Retention by Plan

The cadence and the number of base backups kept depend on the plan:

```bash
exo dbaas type show pg --backup-config PLAN
```

Parameters:

- `PLAN`: the plan of your service, for example `startup-4`.

| Plan family | Backup interval | Base backups kept | Recovery mode | Retention in the [SLA](https://community.exoscale.com/product/dbaas/service-boundaries/sla/index.md) |
| --- | --- | --- | --- | --- |
| `hobbyist-*` | 24 hours | 2 | `pitr` | 1 day |
| `startup-*` | 24 hours | 3 | `pitr` | 2 days |
| `business-*` | 24 hours | 15 | `pitr` | 14 days |
| `premium-*` | 24 hours | 31 | `pitr` | 30 days |

`pitr` means you can recover to any moment since the oldest base backup kept, not only to the
moment of a backup. Read the values for your own plan with the command above.

### Move the Daily Backup

The base backup starts at the time shown in the `Backup Schedule` row of
`exo dbaas show SERVICE_NAME -z ZONE`, in UTC. Move it to a quieter hour:

```bash
exo dbaas update SERVICE_NAME -z ZONE -f --pg-backup-schedule HH:MM
```

Parameters:

- `SERVICE_NAME`: name of the service, for example `my-postgresql`.
- `ZONE`: zone of the service, for example `ch-gva-2`.
- `HH:MM`: start time of the daily backup in UTC, for example `02:30`.

## List the Backups

```bash
exo dbaas show SERVICE_NAME -z ZONE --backups
```

The same list as JSON:

```bash
exo api get-dbaas-service-pg SERVICE_NAME -z ZONE -q 'backups'
```

Each entry has a `backup-name`, a `backup-time` in ISO 8601 and a `data-size` in bytes. Backup
names look like `2026-11-10_13-50_0.00000000.pghoard`, after the UTC time of the backup. The
oldest entry is the earliest moment you can recover to.

> [!NOTE]
> After a [major version upgrade](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/upgrade-major-version/index.md),
> only the backup taken at the end of the upgrade is listed. You cannot recover to a moment
> before the upgrade.

## Point-In-Time Recovery Means a New Service

> [!IMPORTANT]
> There is no in-place restore. You cannot rewind an existing service to an earlier state.
> Recovery creates a **new service**, a fork, from the backups of the old one, and the source
> keeps running untouched.

A fork is a service created with two extra parameters: the service whose backups to use, and
optionally the moment to recover to. Without a moment, the fork has the latest state of the
source.

```bash
exo dbaas create pg PLAN FORK_NAME -z ZONE \
  --pg-fork-from SERVICE_NAME \
  --pg-recovery-backup-time 2026-11-10T13:53:44Z \
  --pg-ip-filter CIDR
```

Parameters:

- `PLAN`: plan of the fork, for example `startup-4`.
- `FORK_NAME`: name of the new service.
- `CIDR`: a network block allowed to connect to the fork.

What to know about forks:

- A service on a `hobbyist-*` plan cannot be forked. Its backups exist, but using them needs a
  `startup-*` plan or larger on the source.
- The fork can be created in another zone than the source.
- The fork copies the data, the roles with their passwords (including `avnadmin`), the service
  settings and the connection pools. It does not copy the IP filter or the maintenance window,
  and it has its own hostname.
- The fork is a billed service of its own. Delete it when you no longer need it.
- Backups belong to a service: once a service is deleted, it can no longer be forked.

The procedure, the accepted timestamp formats and the verification steps are on
[Fork a service and recover to a point in time](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/fork-a-service/index.md).

## Take a Dump for Anything Else

There is no command to take a base backup on demand, and platform backups cannot be downloaded:
they can only be used to fork a service. When you need a copy pinned to a moment you choose, for
example before a risky migration, or a copy you keep outside the platform, take a logical dump:

```bash
pg_dump --format=custom --file=before-migration.dump "SERVICE_URI"
```

Parameters:

- `SERVICE_URI`: the connection URI of the service, from
  `exo dbaas show SERVICE_NAME -z ZONE --uri`.

A dump can be restored into any later PostgreSQL version, which a base backup cannot.

## The `pghoard` Row Is Not a Replica

The WAL archiver connects to PostgreSQL as a replication client. On every service, even one without
standby nodes or read replicas, this query returns a row named `pghoard`:

```sql
SELECT application_name, state, sync_state FROM pg_stat_replication;
```

The archiver also holds a physical replication slot named `pghoard_local` in
`pg_replication_slots`.

> [!WARNING]
> `pghoard` and `pghoard_local` belong to the backup system. Never drop the `pghoard_local` slot,
> and filter `pghoard` out when you look for your own replicas:
> `WHERE application_name <> 'pghoard'`.

## Related Pages

- [Fork a service and recover to a point in time](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/fork-a-service/index.md)
- [Plan for disaster recovery](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/plan-disaster-recovery/index.md)
- [High availability](https://community.exoscale.com/product/dbaas/service-specific/postgresql/overview/high-availability/index.md)
- [Manage Backups and Restores](https://community.exoscale.com/product/dbaas/how-to/backups-restore/index.md)
- [SLA](https://community.exoscale.com/product/dbaas/service-boundaries/sla/index.md)

