> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nearbase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Backups

> Automated backups for your Nearbase PostgreSQL database

## Overview

Nearbase automatically backs up every running instance daily. Backups are managed entirely by the platform — no configuration required.

## Backup Schedule

| Property    | Value                        |
| ----------- | ---------------------------- |
| Frequency   | Daily automated backups      |
| Type        | Full + incremental           |
| Managed by  | Platform (Alibaba Cloud RDS) |
| User action | None required                |

Backup windows are scheduled during low-traffic hours for your region's timezone to minimize impact on running workloads.

## Viewing Backup History

To see your backup history:

1. Open the instance in the [console](https://console.nearbase.dev).
2. Go to the **Backups** tab.

The table shows each backup entry with its:

* **Backup ID**
* **Backup type** (full or incremental)
* **Start and end time**
* **Backup size**
* **Status** (succeeded / failed)

## Retention Policy

Backups are retained according to the policy configured on your instance. You can view the current backup policy on the **Backups** tab. The default retention window is sufficient for most workloads; contact [team@m.nearbase.dev](mailto:team@m.nearbase.dev) if you need a longer retention period.

## Restoring from a Backup

Point-in-time restore and manual restore operations are handled by Nearbase support. If you need to restore your database to a previous state, contact [team@m.nearbase.dev](mailto:team@m.nearbase.dev) with:

* Your instance ID
* The target restore point (date and time, or backup ID)

<Warning>
  Restoring from a backup overwrites the current state of your database.
  Export any data you need to keep before requesting a restore.
</Warning>

## Exporting Data Manually

For application-level exports (e.g., migrating data or creating a local copy), use `pg_dump`:

```bash theme={null}
pg_dump "postgresql://admin:{password}@{instance-id}.pg.nearbase.app:5432/postgres?sslmode=require" \
  --format=custom \
  --file=backup.dump
```

Restore with `pg_restore`:

```bash theme={null}
pg_restore \
  --dbname "postgresql://admin:{password}@{target-host}:5432/postgres?sslmode=require" \
  backup.dump
```
