breat.fr

Backups & Archives

Brivacia automatically protects your statistics with backups, automatic recovery and yearly archives.

Automatic backups

Brivacia regularly creates SQLite backups while your website receives visits — a rotating set of hourly snapshots is kept, so a recent, valid backup is always available without needing to keep every single one forever.

Backups are stored in the private /backup folder and are used automatically if recovery is needed.

Alongside the database, Brivacia also keeps a backup copy of data/settings.json, data/referrers.json and your original data/brivacia.key in the same /backup folder, refreshed automatically as they change.

Automatic restore

If the main database becomes corrupted, Brivacia automatically:

  1. Moves the corrupted database to the /corrupt folder.
  2. Restores the most recent valid backup — if that one turns out to be broken too, it's skipped in favor of the next most recent valid one.
  3. Displays a warning in the dashboard explaining what happened.

Yearly archives

Brivacia automatically archives completed years to keep the live database fast. This happens on its own (checked periodically in the background) and also right after a full import, so freshly imported historical years don't sit in the live database.

There is currently no dedicated "archive now" button in the dashboard — archiving always happens automatically rather than on demand.

Before data is removed from the live database, it is exported as JSON files into the private /archives folder.

Archived statistics remain available in the dashboard whenever all-time statistics are displayed.

Notes

Do you find this project useful? You can support its development using the buttons in the page footer.