Context
Database backups are written to ~/.local/share/budget-forecaster/backups/ on the deployment host, rotated to the last 5 (max_backups), created ~daily (each sync opens the repo) plus on each web-service restart. They live on the same disk as the live DB, so they protect against DB corruption / a bad migration but not against disk failure or loss of the machine. Since the Enable Banking consent was revoked, the transaction history cannot be re-synced from scratch — an off-machine copy is the only real safety net.
The user uses Twake Workplace (Twake Drive, Nextcloud-based) as online storage.
Proposed solution
Mirror each backup to online storage. Options (pick one):
- In-app mirror — add an optional
mirror_directory to BackupConfig; after a successful backup, also copy the file there (with its own retention, independent of the local rolling-5). The mirror path points at a folder the Twake desktop app syncs, or a mounted remote. Testable, works for TUI/CLI/web paths.
- Ops: sync to a Twake-synced folder — a
systemd --user timer on the host copies new backups to a Windows folder synced by the Twake desktop app (/mnt/c/Users/<user>/<TwakeFolder>/... from WSL). Depends on the Windows app running/logged in.
- Ops: push via WebDAV (rclone) — a
systemd --user timer runs rclone copy backups/ twake:budget-backups/ against Twake Drive's WebDAV endpoint (Nextcloud-based → WebDAV, to confirm). Headless, does not depend on the Windows desktop app.
Acceptance criteria
Related issues
Context
Database backups are written to
~/.local/share/budget-forecaster/backups/on the deployment host, rotated to the last 5 (max_backups), created ~daily (each sync opens the repo) plus on each web-service restart. They live on the same disk as the live DB, so they protect against DB corruption / a bad migration but not against disk failure or loss of the machine. Since the Enable Banking consent was revoked, the transaction history cannot be re-synced from scratch — an off-machine copy is the only real safety net.The user uses Twake Workplace (Twake Drive, Nextcloud-based) as online storage.
Proposed solution
Mirror each backup to online storage. Options (pick one):
mirror_directorytoBackupConfig; after a successful backup, also copy the file there (with its own retention, independent of the local rolling-5). The mirror path points at a folder the Twake desktop app syncs, or a mounted remote. Testable, works for TUI/CLI/web paths.systemd --usertimer on the host copies new backups to a Windows folder synced by the Twake desktop app (/mnt/c/Users/<user>/<TwakeFolder>/...from WSL). Depends on the Windows app running/logged in.systemd --usertimer runsrclone copy backups/ twake:budget-backups/against Twake Drive's WebDAV endpoint (Nextcloud-based → WebDAV, to confirm). Headless, does not depend on the Windows desktop app.Acceptance criteria
docs/user/deployment.md.Related issues