How it works
Per engine
Each database has its own fixed time inside the nightly window. The first backup of a new database runs right after it starts. Back up now takes one at any time. If a nightly backup fails, Raff starts another one by itself; a paused database is not backed up again until it is resumed, because nothing in it changes.
Restore into a new database
The default. Raff creates a new database on the same plan from the backup or point in time, named<name>-restored unless you choose. The original keeps running, so you can compare, copy back a table, or switch your app over. The new database is a normal, billed database; high availability is off unless you turn it on.
Restore in place
Overwrites the live database with the older state. Raff first takes a safety snapshot of the current data, then rebuilds the database; it is offline for a few minutes. Writes made after the restore point are gone, except in the safety snapshot.Backups around an upgrade (PostgreSQL)
When you upgrade PostgreSQL to a newer major version, Raff takes a backup right before it, listed as Before upgrade, and one right after it, listed as After upgrade. Backups from before the upgrade carry a tag with their version, such as PostgreSQL 17, and are kept for the plan’s usual retention. Restore on such a backup offers two choices:- Return this database to PostgreSQL 17: the database goes back to how it was when the backup was made, at the same address. Everything written since the upgrade is lost.
- New database on PostgreSQL 17: a new database on the older version. The upgraded one keeps running.
Free databases
Free databases are backed up every night, their backups are kept 3 days, and they restore in place. Point-in-time restore and restoring into a new database come with paid plans.When to use it
- A bad deploy or a wrong
DELETE: restore into a new database to just before it, then copy the rows back. - A test copy of production: restore last night’s backup into a new database.
- Rolling the whole database back: restore in place.
Trade-offs
- Point-in-time restore reaches back to the oldest backup kept, shown in the Backups tab as Restore to any second since….
- After a PostgreSQL major version upgrade, point-in-time restore only reaches back to the upgrade. To go back further, restore a backup from before it.
- Valkey snapshots are nightly: a restore can lose up to a day of keys.
- After a database is deleted, its backups are kept 14 days; within that time only support can restore them.
Related
Back up and restore
Step by step in the dashboard.
High availability and replicas
Protection against server failures.