Skip to content

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 off by default: turn it on from the instance’s Continuous Backup page when you want it.

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

Continuous backup is off until you turn it on for an instance. Turn it on when you want every change copied off-site, and off when you no longer need it.

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 and permanently deletes every restore point from our storage, so you will not be able to restore the instance afterwards. Nothing is deleted from the running instance itself. To keep the restore points, leave continuous backup on.

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