Skip to content
excalibase
backups
Self-hostingbeta

Backups & restore

Three things hold your data: each project's database, the platform database (users, orgs, projects and the vault with every project's credentials) and the object store (backups and customer files). Plan for all three.

Project databases

Every project gets a nightly base backup (02:00 UTC), kept 7 days. You can take one at any time in Studio: Operations → Backups → Trigger Backup.

KubernetesSingle host
HowCloudNativePG with the Barman Cloud plugin: base backups plus continuous WAL archivinga base backup (pg_basebackup) of the project's database
Wherethe bundled store or your bucket, under <projectId>/the bundled store or your bucket
Restore a backupyes, into a new projectyes, into a new project
Restore to a point in timeyes, to any second the WAL coversnot working yet: WAL archiving is not applied to single-host projects, so a point-in-time restore does nothing

Restore in Studio: Operations → Backups → Restore / PITR, pick a backup (or, on Kubernetes, a time), Restore. The restore creates a new project beside the old one with the data as of that backup, and new credentials; the source project is not touched. Point your apps at the new project id, then delete the old project when you no longer need it.

What a restore into a new project brings

Comes with the copyDoes not
Tables, data and database functionsApps, sites and custom domains
The realtime tables (Postgres)CORS origins an app added
End users and their passwordsEdge functions, their secrets and outbound hosts
API permissions: table access, columns and row filtersStored files
Tracked functions and the roles that may call themProject members
CORS origins you addedSessions, API keys and email links issued by the source
Auth settings: email verification and site URL

The permissions, CORS origins and auth settings are the source's as they are when you restore, not as they were at the backup. End users sign in again and get new sessions; create new API keys for the copy. Deploy apps, sites and functions to the copy yourself: they are running services with their own addresses and secrets, and the restore does not copy them.

A restore into a new project takes one of your plan's projects as soon as you start it, so nothing created while it runs can take that slot. When the plan is full the restore is refused straight away; restore into the same project instead, which replaces its data.

A deleted project stays stopped, and can be brought back, for 7 days. Its backups are then kept 14 more days, unless you chose to delete them with the project.

The platform database

Losing it loses every account and the vault, so every project's credentials, even though the project databases survive.

Kubernetes. Turn on continuous backups of it (WAL plus a nightly base backup) to the bundled store or a bucket of its own:

platformDb:
  backup:
    enabled: true
    schedule: "0 0 2 * * *"
    retention: 30d
    # with your own bucket instead of the bundled store:
    # s3: { endpointURL: https://..., bucket: ..., path: platform, credentialsSecret: platform-db-backup-creds }

Check it archives: the ContinuousArchiving condition of the platform-db Cluster is True:

kubectl -n excalibase-platform get cluster platform-db \
  -o jsonpath='{.status.conditions[?(@.type=="ContinuousArchiving")].status}'; echo
kubectl -n excalibase-platform get backups

To recover it, create a new CloudNativePG Cluster that bootstraps from the platform-db-backups ObjectStore (bootstrap.recovery with the Barman Cloud plugin, see the plugin's documentation), then point the platform at it. Rehearse this on a throwaway cluster before you need it.

Single host. The platform database is the postgres service's volume. Dump it on a schedule and copy the dump off the machine, together with the control plane's volume (excalibase-platform-provisioning), which holds the vault's unseal key unless you installed with --manual-unseal:

docker compose exec -T postgres pg_dump -U excalibase -Fc excalibase_platform > platform-$(date +%F).dump

Keep .env with them: the dump is useless without the secrets the install was created with, and the vault in it cannot be opened without its unseal key.

The object store

The bundled store keeps one copy on the same disk as your databases. A lost disk then loses the backups as well. For disaster recovery, either copy the store's volume off the machine regularly (single host: the excalibase-platform-objectstore volume; Kubernetes: the rustfs-data volume) or send backups to a bucket elsewhere (Cloudflare R2, or an S3-compatible store with STS) as shown in Configuration.

Rehearse

A backup you have not restored is a hope. After installing, and after any change to storage settings: create a project, write a few rows, trigger a backup, restore it into a new project and read the rows back.