Guide menu

Loading…

Nothing matches “”.

Backups

ProofTrail backs itself up every night, at 01:45 in your company's timezone: a dump of the database and the uploaded files, in one zip archive. It keeps every backup for 7 days, then one a day for 16 days, one a week for 8 weeks, one a month for 4 months and one a year for 2 years.

Backups go to storage/backups by default, which is on the same server. Configuration explains how to keep a copy elsewhere, which you should.

What isn't in a backup

  • APP_KEY. Keep it in your password manager: a restored backup can't read the encrypted fields without it.
  • .env and docker-compose.yml. Keep a copy of them too.

Restoring

  1. Stop ProofTrail: docker compose down.
  2. Unzip the archive, with its password if you set BACKUP_ARCHIVE_PASSWORD. It holds the database as SQL in db-dumps/ and the uploaded files in app/.
  3. Rebuild the database from the dump, in place of the old one:
rm storage/database/database.sqlite
sqlite3 storage/database/database.sqlite < db-dumps/sqlite-database.sql
  1. Put the uploaded files back in storage/app, and give the folder back to user 1000 with sudo chown -R 1000:1000 storage.
  2. Make sure APP_KEY in .env is the one the backup was made with.
  3. Start it again: docker compose up -d.

Settings › Backups lists the backups, starts one by hand and downloads them.