Files
wekan/docs/Features/Admin-Panel
Lauri Ojansivu 6b9bc496b1 Add continuous backup to the Admin Panel: stream every change, restore to a moment.
Admin Panel / Attachments / Continuous backup, beside Backup, streams the
database, filesystem attachments, avatars and logs to a target directory
within seconds, so less work is lost between scheduled archives and a
restore can return to a chosen moment. Design: docs/Backup/Continuous-Backup.md.

The built-in engines use only copyfree code - WeKan's own (MIT), Node.js
and its node:sqlite (SQLite, public domain) - and start no other program:

- oplog: tails local.oplog.rs like Meteor's oplog driver, on a MongoDB
  replica set or FerretDB with its oplog; a base archive (the existing
  wekan-instance-backup format), then whole documents and deletions,
  continued from the saved position after a restart, a new generation
  when the oplog has lost it.
- sqlite: SQLite's online backup API on FerretDB's WAL database at an
  interval, storing only the pages that changed.
- files: attachments, avatars and logs by watching and by rescans, each
  content once under its SHA-256, links never followed.

Litestream (Apache-2.0) is an optional engine for SQLite: WeKan writes its
configuration and supervises a binary the administrator installed.

Segments are written whole, flushed and listed in append-only indexes.
A restore checks every index line, segment and blob first and writes
nothing when one is missing or changed; a database restore replays up to
the chosen moment, a file restore puts files back (add-missing or
replace-all), and a SQLite restore builds a checked file beside the stream,
never over the live one. Site administrators only; failures of the
unattended stream show in Admin Panel / Problems.

Tests: tests/continuousBackup.test.cjs; tests/integration/continuousBackup.test.cjs
against a real replica set, a real WAL database, real files and a stand-in
Litestream; server/lib/tests/continuousBackup.tests.js through the methods;
tests/playwright/specs/admin-continuous-backup.e2e.js on Chromium and WebKit.

Thanks to xet7 !
2026-10-03 01:47:42 +03:00
..