Skip to content

Backups

Backups are your job. The server holds data in two places, and both belong in a backup.

  1. The PostgreSQL database. Accounts, flags, stats, weapons, scripts and their history, bans, and the audit log.
  2. The data folder. Levels, images, script SQLite databases (databases/*.sqlite), and optional logs.
Terminal window
pg_dump --format=custom --file=borne.dump "$BORNE_DATABASE_URL"
cp -r data/levels data/databases data/weapons data/npcs data/classes backup/

logs/ is optional. Also keep your signing key and cache secret somewhere safe and separate: without the signing key you cannot sign for clients that trust it.

Terminal window
0 3 * * * docker compose -f /srv/borne/deploy/docker-compose.yml exec -T postgres pg_dump -U borne -Fc borne > /srv/backup/borne-$(date +\%F).dump

Restore with pg_restore into an empty database, put the folders back, and start the server. The server applies any newer migration at start.

On a crash, at most the last second of flag changes and the last 60 seconds of player position and stats can be lost. A script that needs a stronger guarantee keeps its data in its own SQL database.

A normal stop (SIGTERM) loses nothing: the server writes everything before it exits.

Engine version 0.1.0. Built 2026-11-18.