What's new

Bring a PostgreSQL back to the moment before a mistake

Turn on the continuous backup of a PostgreSQL, and you can restore it, or create a new database, at any second since you turned it on, up to 14 days back.

A migration drops the wrong column at 15:00. Your last daily backup dates from 03:00 that night, so restoring it would cost you 12 hours of orders. With a continuous backup, you return to 14:59 instead.

Restore to a moment dialog of orders-db, with its restorable period and a date and time to the second.Restore to a moment dialog of orders-db, with its restorable period and a date and time to the second.
The dialog shows the period you can return to.

Turn it on

A continuous backup sends each change of your PostgreSQL to the storage bucket of its backups, at least once a minute while the database writes. Open the database's Backups tab and choose Turn on in the Continuous backup card. The database restarts 1 time, so your applications lose it for about 10 seconds, or about 2 seconds with high availability. The daily backups go on beside it.

See Continuous backup of a PostgreSQL for what you accept and how to turn it on.

Return to a moment

Once the first physical backup ends, the card shows the period you can return to. It starts at that backup, grows to 7 to 14 days once it has run for a week, and trails your live database by 5 to 6 minutes. You then have 2 choices:

  • Restore to a moment brings the database back to the second you choose. It stops while Tenkai replays its history, then starts again with the same hostname and credentials, so your applications need no change.
  • New database… creates another PostgreSQL from that second while the source keeps running. Use it to read old rows, or to copy back only the ones a mistake removed.

See Restore to a moment and Create a database from a moment for the steps.

High availability included

High availability is still in early access, and opens to every team soon. A PostgreSQL with high availability gets the same continuous backup. Both instances send their changes to the bucket, so the period you can return to goes on through a failover.

What it costs

Your bucket holds about 2 times the size of the database, plus what it writes in 14 days. The history is not encrypted with your team's backup key, because pgBackRest cannot encrypt to a public key, so guard access to that bucket.

Read PostgreSQL continuous backup and point-in-time recovery for how the replay works.