Skip to content
Browse docs

Continuous Backup

Continuous backup copies every change to your instance’s database off-site as it happens, using Litestream. If a bad migration, a buggy hook or a mistaken delete damages your data, you pick a moment from the last 7 days and put the database back to exactly that state. There is no nightly gap: a change made a minute before the mistake is still there.

You can check and switch it on or off from the portal or the CLI. Restoring happens in the portal.

Continuous backup is included with the Starter and Pro plans. It is on by default for every PocketBase instance created on a paid plan.

Prerequisites

What is and is not backed up

Backed up Not backed up
Records, collections and schemas Uploaded files (images, documents, attachments)
Users, auth settings and API rules Request logs and admin activity history
Instance settings and superuser accounts

Uploaded files live next to the database, not in it, so a restore does not roll them back. To protect them too, keep taking the standard PocketBase backup from the admin panel under Settings → Backups, or store files in an S3-compatible bucket — see File Uploads.

Step 1: Check that it is on

Using the portal

  1. Open the instance in the portal
  2. In the sidebar, click Continuous Backup

The card shows a status badge: Replicating when changes are streaming off-site, Not replicating when replication has stopped, or Off.

Using the CLI

pbc pocketbase continuous-backup status --name my-app
Flag What it does
--name <instance> Which instance. Defaults to the one this directory is linked to.

Step 2: Turn it on or off

It is already on for new paid instances, so you only need this step to turn it back on after switching it off, or to turn it on for an instance created before you upgraded.

Using the portal

  1. On the instance’s Continuous Backup page, use the switch on the card
  2. When turning it off, confirm with Turn Off Backup

If the badge says Not replicating, click Retry Replication.

Using the CLI

pbc pocketbase continuous-backup enable --name my-app
pbc pocketbase continuous-backup disable --name my-app

Turning it off stops copying new changes. Restore points already copied off-site stay available until they are older than 7 days, and nothing is deleted from the instance.

Step 3: Restore to a point in time

Restoring replaces the database and cannot be undone. The instance stops, its database is replaced with the state from the moment you pick, and it starts again. Records written after that moment are lost.

Using the portal

  1. On the instance’s Continuous Backup page, open Restore to a Point in Time
  2. Choose a Day, then a Time
  3. Click Restore Instance, then confirm with Restore Instance in the dialog

The CLI has no restore command: restoring is a destructive, pick-a-moment action, so it lives in the portal where you can see the available restore points. From the terminal, pbc pocketbase continuous-backup status tells you whether there is anything to restore.

What the platform does for you

  • Restore points follow your writes. A new restore point appears only when the database changes, so an instance with no recent writes shows no newer points. That is expected: the latest point is still the current state.
  • Downgrading keeps what you have. If the instance moves off a paid plan, replication stops, but the restore points already copied stay restorable until they expire. Upgrade again to resume.
  • The copy lives elsewhere. Changes stream to object storage off the server your instance runs on, so a lost server does not take the backup with it.

Next steps