# Backup

> Backup and point-in-time recovery
---

Pigsty uses [pgBackRest](https://pgbackrest.org/) to manage PostgreSQL backups, it may be the most powerful open-source backup tools in the ecosystem.
With incremental / parallel backup & restore, encryption, [MinIO](/docs/minio) / S3 support, and many other features.
Pigsty has pre-configured it for every [PGSQL](/docs/pgsql/) cluster by default.


**Policy**


        Backup scripts, scheduling, pgbackrest, repo and admin



**Admin**


        Backup policy, disk planning, recovery window trade-off



**Restore**


        Restore to specific time point with playbook



**Example**


        Sandbox example: Perform recovery with bare hands





**NO WRANTTY**

Pigsty try its best to provide a reliable PITR solution, but we do not take any responsibility for the data loss caused by the PITR operation, use it at your own risk.
For professional support, consider our [pro service](/docs/service).



--------

## Quick Start



### Step 1
        [Backup Policy](/docs/pgsql/backup/mechanism): Schedule Base Backups with Crontab


### Step 2
        [WAL Archiving](/docs/pgsql/backup/policy): Continuously record write activities


### Step 3
        [Restore & Recovery](/docs/pgsql/backup/restore): Recover from backup and wal archive



```yaml {title="Full backup everyday 1am"}
node_crontab: [ '00 01 * * * postgres /pg/bin/pg-backup full' ]
```

```bash {title="restore to a timepoint"}
./pgsql-pitr.yml -e '{"pg_pitr": { "time": "2025-07-13 10:00:00+00" }}'
```

---

Section pages:

- [Mechanism](/docs/pgsql/backup/mechanism/): Backup script, schedule, repository, and infrastructure
- [Repository](/docs/pgsql/backup/repository/): Backup storage repository for PostgreSQL
- [Policy](/docs/pgsql/backup/policy/): Design backup policy according to your needs.
- [Admin](/docs/pgsql/backup/admin/): Manage backup repo and backups
- [Restore](/docs/pgsql/backup/restore/): Restore PostgreSQL from Backup
- [Example](/docs/pgsql/backup/example/): Perform PITR manually in sandbox according to hint script
