# Database Backups

> Available S3 endpoint: `a-s3.aur.lu` (France, Albi).

## Postgres (pgBackRest)

Reliable, feature‑rich backups for PostgreSQL with S3 repository support (full, incr, WAL archiving).

- Homepage: [pgBackRest](https://pgbackrest.org/)
- Docs: [pgBackRest Documentation](https://pgbackrest.org/user-guide.html)
```ini title="pgbackrest.conf"
[global]
repo1-type=s3
repo1-bucket=pgbackrest
repo1-s3-endpoint=a-s3.aur.lu
repo1-path=/org1/clusterA
repo1-s3-key=<YOUR_ACCESS_KEY>
repo1-s3-key-secret=<YOUR_SECRET_KEY>
repo1-s3-verify-ssl=y
repo1-s3-uri-style=path
```

## MySQL (mysqldump + rclone)

Simple logical backups using `mysqldump`, then push compressed dumps to Aurora via [rclone](https://docs.aur.lu/docs/s3/tools/rclone).

- MySQL: [Docs](https://dev.mysql.com/doc/)
- rclone: [Docs](https://rclone.org/docs/)
```bash
mysqldump --all-databases | gzip > dump.sql.gz
rclone copy dump.sql.gz aurora:db-backups/mysql/   --s3-no-check-bucket --s3-endpoint https://a-s3.aur.lu --s3-force-path-style
```
