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..envanddocker-compose.yml. Keep a copy of them too.
Restoring
- Stop ProofTrail:
docker compose down. - Unzip the archive, with its password if you set
BACKUP_ARCHIVE_PASSWORD. It holds the database as SQL indb-dumps/and the uploaded files inapp/. - 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
- Put the uploaded files back in
storage/app, and give the folder back to user 1000 withsudo chown -R 1000:1000 storage. - Make sure
APP_KEYin.envis the one the backup was made with. - Start it again:
docker compose up -d.
Settings › Backups lists the backups, starts one by hand and downloads them.