> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-fbfa8bee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Backup and restore

> Understand backup strategies and point-in-time recovery for ClickHouse Managed Postgres

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

export const galaxyOnClick = eventName => () => {
  try {
    if (typeof window !== "undefined" && window.galaxy && eventName) {
      window.galaxy.track(eventName, {
        interaction: "click"
      });
    }
  } catch (e) {}
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>Beta</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                Beta feature. 
                <u>
                    <a href="/docs/beta-and-experimental-features#beta-features">
                        Learn more.
                    </a>
                </u>
            </span>
        </div>;
};

Managed Postgres ensures the safety and availability of your data through automated backups and point-in-time recovery. You can view your backup history and initiate restores from the **Backups** view of your instance.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-fbfa8bee/rF8ZX2ZZNpnwXrqH/images/managed-postgres/backup-and-restore.png?fit=max&auto=format&n=rF8ZX2ZZNpnwXrqH&q=85&s=331d48de07dedfb9efeafa1d13a26371" alt="Backups view showing backup history and point-in-time recovery options" size="lg" border width="3244" height="2028" data-path="images/managed-postgres/backup-and-restore.png" />

<h2 id="backups">
  Backups
</h2>

<h3 id="backup-frequency">
  Backup frequency
</h3>

Managed Postgres takes daily full backups of your database. In addition to full backups, Write-Ahead Log (WAL) files are archived every 60 seconds or when 16 MB of WAL data accumulates, whichever comes first. This combination of full backups and continuous WAL archiving enables point-in-time recovery to any moment within the retention window.

<h3 id="retention-period">
  Retention period
</h3>

Backups are retained for 7 days, providing a sufficient window for recovery in case of data loss or corruption. If you need a longer backup retention period, contact [support](https://clickhouse.com/support/program).

<h3 id="storage-and-durability">
  Storage and durability
</h3>

Backups are replicated across multiple servers using erasure coding, ensuring they remain accessible even if some storage servers become unavailable. Backup storage is isolated at the bucket level—each Managed Postgres instance has its own dedicated storage bucket, and credentials are scoped to only allow access to that instance's backups.

<h2 id="point-in-time-recovery">
  Point-in-time recovery
</h2>

Point-in-time recovery allows you to restore your database to any specific moment within the backup retention window. This is useful for recovering from accidental data deletion, corruption, or other issues where you need to roll back to a known good state.

To perform a point-in-time recovery:

1. Navigate to the **Backups** view of your Managed Postgres instance.
2. In the **Point in time recovery** section, select the target date and time (in UTC) you want to restore to.
3. Click **Restore to point in time**.

The restore operation creates a new Managed Postgres instance with the state of your database as it was at the selected point in time. Your original instance remains unchanged, allowing you to verify the restored data before making any decisions about which instance to keep.
