Backup and restore
A backup is the only thing that lets you get your family's tree back after a mistake or a lost server. Set one up before you add real data.
What a backup contains
One encrypted file, data/backups/kinship-YYYY-MM-DD-HHMM.tar.enc, holding a copy of the whole database. KinShip 0.2 stores no photos or other files yet; the archive has a place for them. It is encrypted with BACKUP_PASSPHRASE, so the file can sit in cloud storage without exposing the tree.
Make a backup
Backups run on a schedule inside the api, every day at 03:00 by default. The SuperAdmin can change the schedule and how many are kept in Admin → Backups, press Back up now, or press Test the latest backup, which restores the newest one into a temporary database, compares it with what was backed up, and throws it away. From the command line:
docker compose exec api kinship backup # make one now docker compose exec api kinship backup-list # what is in the folder docker compose exec api kinship backup-verify kinship-2026-11-14-0300.tar.enc --full
Copy data/backups and your .env somewhere else regularly. A backup on the same disk does not survive the disk.
Restore
A restore replaces everything: people, accounts and settings. In 0.2 it is a command, run on the server with KinShip stopped. An in-app Restore button arrives in 0.3.
docker compose stop web api
docker compose run --rm api kinship restore kinship-2026-11-14-0300.tar.enc # asks you to type RESTORE
docker compose up -d
The restore checks the whole backup first, saves a safety copy of what is there, then replaces the database in one transaction. If anything fails, the database is exactly as it was. Afterwards everyone is signed out.
On a new server
Bring the backup file, your .env (the same database and role names, and the backup passphrase) and compose.yml. The install guide lists the four steps, and explains how to open a backup without KinShip.
The complete docs live in the repository and open on GitHub. This page summarises the one thing worth reading before you add real data.