mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
The result of an Admin Panel backup lived only in the memory of the server process that ran it. After a restart, or on another pod of a multi-pod deployment, the Backup pane said "idle", so nobody could see whether last night's backup had worked. There was no history, no warning when a scheduled backup failed or did not run, and local backups were never cleaned up. - Every run, scheduled or "Backup now", is recorded in backupRuns: start and end, who or the schedule, scope, storage, status, size, duration and error. Records are kept 400 days. A run still "running" after 24 hours counts as failed, and a scheduled run skipped for another backup is recorded as failed. - Admin Panel / Problems / Backup shows the last success (overdue when its period has passed), the last failure with its error, the next run and the last 30 runs. The same status is above the schedule in Attachments / Backup. - Problems / Summary lists "Backup failed" and "Backup overdue". /metrics adds wekan_backup_last_success_timestamp_seconds, wekan_backup_last_run_timestamp_seconds, wekan_backup_last_run_success and wekan_backup_overdue for alerting. - BACKUP_KEEP_DAYS: after a successful backup, local backups of the same scope older than N days are deleted. The newest is always kept, and only a directory inside the backup root holding a backup.zip is removed. From the patch by Raymond-Voogt, and in Admin Panel as well: - BACKUP_KEEP_DAYS is the catalog's backup section (models/lib/authConfigCatalog.js), overridable beside the schedule in Admin Panel / Attachments / Backup and resolved through authEnv at every backup. - It is listed on every platform: the compose files, start-wekan.sh and .bat, the snap config and help, and the Dockerfile, which the patch's version had missed. Its platform hunks, written before #6789, were re-applied by hand. tests/backupRuns.test.cjs (21): the run records, overdue and pruning against a real directory, and the Admin Panel override, including that nothing reads the variable around it. tests/authConfigCatalog.test.cjs checks every platform. admin-attachment-retention.e2e.js checks the Backup pane shows the field. Thanks to Raymond-Voogt and xet7 ! Fixes #6790.
68 lines
3.9 KiB
JavaScript
68 lines
3.9 KiB
JavaScript
import '/client/components/settings/adminProblems.jade';
|
|
import '/client/components/settings/attachments.jade';
|
|
// Backup status and history, shared by Attachments / Backup and Problems / Backup.
|
|
import '/client/components/settings/backupRunsStatus.jade';
|
|
import '/client/components/settings/connectionMethod.jade';
|
|
import '/client/components/settings/informationBody.jade';
|
|
import '/client/components/settings/invitationCode.jade';
|
|
import '/client/components/settings/migrationProgress.jade';
|
|
import '/client/components/settings/notificationSettingsPopup.jade';
|
|
import '/client/components/settings/notificationDeliverySettings.jade';
|
|
import '/client/components/settings/emailToCardSettings.jade';
|
|
import '/client/components/settings/emailBounces.jade';
|
|
import '/client/components/settings/peopleBody.jade';
|
|
import '/client/components/settings/settingBody.jade';
|
|
import '/client/components/settings/sharedLabelsSettings.jade';
|
|
import '/client/components/settings/settingHeader.jade';
|
|
import '/client/components/settings/leftMenu.jade';
|
|
import '/client/components/settings/tablePage.jade';
|
|
import '/client/components/settings/tablePage.js';
|
|
import '/client/components/settings/translationBody.jade';
|
|
|
|
import '/client/components/settings/adminProblems.js';
|
|
import '/client/components/settings/attachments.js';
|
|
import '/client/components/settings/backupRunsStatus.js';
|
|
import '/client/components/settings/connectionMethod.js';
|
|
import '/client/components/settings/informationBody.js';
|
|
import '/client/components/settings/invitationCode.js';
|
|
// The left menu's caret. Its .jade above only DRAWS the caret: the click that
|
|
// folds the menu and the `isLeftMenuCollapsed` helper that says whether it is
|
|
// folded live here, and package.json sets meteor.mainModule, so a file nobody
|
|
// imports is simply not in the bundle. Without this line the caret rendered and
|
|
// did nothing - an unregistered helper is undefined, so the panel never took
|
|
// the `collapsed` class either. docs/Features/All-Boards/Left-Menu.md
|
|
import '/client/components/settings/leftMenu.js';
|
|
import '/client/components/settings/lockedUsersBody.js';
|
|
import '/client/components/settings/migrationProgress.js';
|
|
import '/client/components/settings/notificationSettingsPopup.js';
|
|
// #3695: notification delivery (content, grouping, schedule) per channel, in
|
|
// Notification Settings and in each outgoing webhook form.
|
|
import '/client/components/settings/notificationDeliverySettings.js';
|
|
// #794: email to card, in the same popup.
|
|
import '/client/components/settings/emailToCardSettings.js';
|
|
// #794: Admin Panel -> E-mail -> Bounces.
|
|
import '/client/components/settings/emailBounces.js';
|
|
import '/client/components/settings/peopleBody.js';
|
|
import '/client/components/settings/settingBody.js';
|
|
import '/client/components/settings/sharedLabelsSettings.js';
|
|
import '/client/components/settings/settingHeader.js';
|
|
import '/client/components/settings/problemsSummary.jade';
|
|
import '/client/components/settings/problemsSummary.js';
|
|
import '/client/components/settings/translationBody.js';
|
|
|
|
// adminProblems.css was missing here, so NONE of the Admin Panel report styling
|
|
// was in the bundle (package.json sets meteor.mainModule, so a CSS file that is
|
|
// never imported is simply not loaded). That is why the report search box and
|
|
// the prev/next pagination buttons fell back to the global `button` rule in
|
|
// forms.css and rendered with a black/grey background instead of the theme.
|
|
import '/client/components/settings/adminProblems.css';
|
|
import '/client/components/settings/attachments.css';
|
|
import '/client/components/settings/informationBody.css';
|
|
import '/client/components/settings/lockedUsersBody.css';
|
|
import '/client/components/settings/migrationProgress.css';
|
|
import '/client/components/settings/peopleBody.css';
|
|
import '/client/components/settings/settingBody.css';
|
|
import '/client/components/settings/settingHeader.css';
|
|
import '/client/components/settings/tablePage.css';
|
|
import '/client/components/settings/translationBody.css';
|