# Backup & restore

Percher backs up the entire platform every night to encrypted off-site storage, so a corrupted database, deleted volume, or lost server restores from yesterday's archive rather than from scratch.

What's backed up: every app's `/app/data` volume (databases, uploaded files, SQLite, caches), every PocketBase sidecar's `pb_data`, platform metadata (apps, users, deployments, env-var ciphertext, custom-domain config), Forgejo deploy-history repositories, and Caddy TLS certs (so HTTPS works immediately after a restore).

Schedule and storage: daily at 02:00 UTC, encrypted with AES-256 (GPG symmetric), uploaded to off-site storage in a different EU datacenter from production. Encrypted backups are retained off-site for 30 days. Recent nightly copies are also kept on the production server; disk pressure can move older verified copies off-site while keeping at least three recent nightly generations locally. A failed backup pings on-call on Discord and emails the operations mailbox within minutes.

Restoring is self-service. List what you can restore from with `bunx percher backups <app>`, then `bunx percher restore latest <app>` (`source` also takes a UTC date `YYYY-MM-DD` or a full backup id). Add `--dry-run` first to see exactly what would happen, and `--components pocketbase` to restore only PocketBase. A local MCP assistant can use `percher_backups` and `percher_restore`; the hosted connector can list backups but cannot restore them. For running PocketBase apps, the dashboard also offers restore under Data → Backups. For older off-site archives or anything the CLI can't reach (a deleted app, a cross-account copy), request help through a dashboard support case at https://percher.app/support/new with the app name, what was lost, and roughly when. During the beta, please share App Data (logs, files, database content, diagnostics) for ordinary support through a dashboard support case; describe it or attach screenshots there. General questions may be emailed to support@percher.app; the abuse@, security@ and legal@ reporting channels are unchanged.

What it does not protect against: writes since the last successful backup (up to ~24h if the latest scheduled backup completed; longer if it failed), application-level corruption you replicated into a backup, and loss older than the 30-day retention window. Note: `bunx percher delete` queues app deletion, but a retained successful archive may permit recovery of its saved components through support; recovery depends on archive availability and retention. For sub-daily protection, run your own dump (PocketBase's built-in backup endpoint, or use SQLite's online backup API or `VACUUM INTO` for a consistent live snapshot; do not copy only an active main file because committed writes may remain in its WAL).

With the SQLite CLI installed, replace these paths with your database and snapshot destination:
```sh
sqlite3 /app/data/app.db ".backup /app/data/app-snapshot.db"
```
Copy the completed snapshot to protected off-site storage.

Full guide: https://percher.app/docs/backup-and-restore
