Platform

Point-in-time recovery

Restore your database to any second within the retention window — continuous WAL archiving.

Point-in-time recovery (PITR) lets you roll your database back to any moment — e.g. right before an accidental DELETE without a WHERE — with one-second precision. Enable it in Database → Point-in-time recovery.

How it works

  • Postgres continuously archives WAL segments, so in the worst case you lose the last couple of minutes on a quiet database.
  • A full base backup is taken daily; base backups and WAL are kept for your plan's retention period and copied off-site to Azure Blob Storage.
  • Restore: the stack is stopped, a data directory is built from the newest base backup before the chosen moment, and WAL is replayed up to recovery_target_time. Postgres is then promoted and services start again.
  • If a restore fails, the previous data directory is kept and the project returns to service.
PlanPITR retention
Freenot available (daily backups still run)
Proup to 7 days
Teamup to 14 days
Enterpriseup to 30 days
ItemValue
Restore windowfrom the oldest base backup to the last archived WAL — shown on a timeline in the dashboard
Time zonethe dashboard uses Warsaw time; the API and MCP accept and return UTC (ISO 8601)
Enablinga Postgres restart (~10 s) and the first base backup
Downtime during restorea few minutes, depending on database size and WAL volume
Scopethe whole Postgres database (including auth and storage metadata). Storage files are not rolled back.

API

# status and restore window
curl -H "Authorization: Bearer hb_pat_..." https://host.ulewicz.space/api/v1/projects/<ref>/pitr

# enable with 7-day retention
curl -X PUT -H "Authorization: Bearer hb_pat_..." -H "content-type: application/json" \
  -d '{"enabled":true,"retention_days":7}' https://host.ulewicz.space/api/v1/projects/<ref>/pitr

# restore to a moment (UTC)
curl -X POST -H "Authorization: Bearer hb_pat_..." -H "content-type: application/json" \
  -d '{"target_time":"2026-10-15T12:34:56Z"}' https://host.ulewicz.space/api/v1/projects/<ref>/pitr/restore

MCP offers get_pitr and restore_pitr — the latter requires confirm_ref (the project ref) as a safeguard. A restore overwrites the current database state — to just look at past data, create a branch with data.