Skip to content
KylthDOCS

Backups

What Kylth backs up, where the archives go, how restores work, and what you must protect yourself.

A backup on the same server isn’t disaster recovery. By default, Kylth writes backups to /opt/kylth-backups on the server itself. That protects you from mistakes, such as a dropped table. It doesn’t protect you from losing the server, its disk, or your account with the provider. For that, send backups off the server.

  1. Send project backups off the server. Add an S3-compatible bucket as a backup destination, and use it for the projects’ schedules.
  2. Back up Kylth’s own folders with your server’s usual backup tooling: /opt/kylth and /etc/kylth.
  3. Test a restore now and then, into a new project, so you know the backups work.

What a project backup contains

Each backup is one archive holding:

  • database.dump: the project’s Postgres database, from pg_dump
  • volumes.tar.gz: the project’s storage and edge functions
  • env: the project’s configuration
  • manifest.json: what the archive contains, and when and from which project it was taken

The env file holds the project’s secrets in plain text. Treat backup archives with the same care as the project itself.

Take and schedule backups

In the project’s Backups tab, back up on demand, or add a New backup schedule.

Where archives are written

By default, archives go to /opt/kylth-backups/<project>/ on the server. To send them elsewhere, go to Settings → Backups, and under Backup destinations, select New destination. A destination is either a folder on the server or an S3-compatible bucket.

If a backup fails, it’s marked as failed in the project’s Backups tab, with the error beneath it.

Restoring

From a backup, Kylth offers two kinds of restore:

  • Restore into a new project creates a new project from the archive’s database and volumes. Nothing existing is touched, and the original project keeps running.
  • Restore over an existing project stops the target, rebuilds its database from the archive and replaces its storage and functions. The target keeps its own address, ports and secrets.

Restoring over an existing project can’t be undone. Whatever is in the target project beforehand is lost. When in doubt, restore into a new project first.

Recovering Kylth itself

Project backups restore projects. To recover Kylth on a server, you also need:

Folder Why you need it
/opt/kylth Kylth’s database, keys and licence. Without its keys, Kylth can’t decrypt the credentials it stores, such as those for an S3 destination.
/etc/kylth Your settings and docker-compose.yml

/opt/supabase-projects holds each project’s live files, database included. Copying a running database’s files doesn’t give you a reliable database. For the data, rely on Kylth’s project backups.