diff --git a/docs/cloud_backup.md b/docs/cloud_backup.md index 2edd26b..9a600e2 100644 --- a/docs/cloud_backup.md +++ b/docs/cloud_backup.md @@ -14,6 +14,14 @@ The Cloud Backup page manages cloud backup settings, schedules, and status. - **Save**: Button to save schedule settings by disabling during the request. - **Error/Success Feedback**: Inline messages for save actions. +## File Filters +- **Exclude Patterns**: Skip files or folders that match these rclone patterns. +- **Include Patterns**: Back up only files or folders that match these rclone patterns. +- Enter one plain rclone pattern per line. Blank lines and lines that start with `#` or `;` are ignored. +- Do not enter rclone filter rule prefixes such as `+`, `-`, or `!`. SimpleSaferServer creates the rclone `--filter-from` file for the backup run. +- Exclude patterns are written first, then include patterns. If at least one include pattern exists, SimpleSaferServer adds a final `- **` rule so the include list works like an allow-list. +- These pattern files are stored under the app config directory and are passed to rclone through `--filter-from`, so the full pattern list is not placed in the rclone process arguments. + ## Cloud Backup Settings - **Backup Mode**: Choose between: - MEGA (Simple) diff --git a/docs/dashboard.md b/docs/dashboard.md index 10df2bb..712e1a2 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -16,7 +16,8 @@ Four cards display real-time status: - **System Resources**: Displays CPU and RAM usage, and live network traffic (up/down rates). ## Task Schedule -- **Table**: Lists all scheduled tasks with columns for Task, Status, Last Run, and Next Run. +- **Table**: Lists all scheduled tasks with columns for Task, Status, Last Run, Next Run, and + Automatic Runs. - **Next Run**: Shows the active next run time or a short schedule state label. Temporary disables show `Disabled until 18:00`, `Disabled until Tomorrow 18:00`, or a later date such as `Disabled until May 16 18:00`. Permanent disables show `Disabled`. Timers disabled outside @@ -24,6 +25,10 @@ Four cards display real-time status: Disabled schedule labels are danger-colored in this field only, so automatic-run suspension stands out without making the entire task row look failed. Schedule issues remain warning-colored because they mean the timer state needs investigation. +- **Automatic Runs**: The `Check Mount`, `Drive Health Check`, and `Cloud Backup` rows have a direct + on/off switch. Turning the switch off permanently disables that task's systemd `.timer`, so the + task no longer starts on its schedule. Turning the switch on enables the timer again. Manual Start + from the task page still starts the `.service` immediately. - **Task Schedule Control**: Right-click a task row to Start, Stop, Disable Schedule, or Enable Schedule when that action applies. The menu stays open across passive schedule refreshes so the operator does not lose the selected row actions while reading the menu. diff --git a/docs/setup.md b/docs/setup.md index 2a59667..a62a64a 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -115,6 +115,10 @@ Advanced mode: gives the mount check time to finish before health probes the drive, even with systemd's small randomized delay. - The installer may generate those unit files earlier, but it keeps the timers inactive while `system.setup_complete` is false so persistent timers cannot run with placeholder setup values. +- Setup creates a small self-backup archive on the mounted backup drive after completion. +- A daily self-backup timer then runs one minute before cloud backup, so cloud backup can copy the fresh setup archive too. +- Self-backup archives include SimpleSaferServer-owned setup config, rclone config, msmtp config, and owned Samba include files. They do not include `/etc/fstab` or a full system backup. +- Manual backup and restore commands are documented in [Setup Self-Backup](setup_self_backup.md). ## Later Changes diff --git a/docs/setup_self_backup.md b/docs/setup_self_backup.md new file mode 100644 index 0000000..3acf8b3 --- /dev/null +++ b/docs/setup_self_backup.md @@ -0,0 +1,79 @@ +# Setup Self-Backup + +SimpleSaferServer can back up the files that its setup flow owns. This helps you recover the web app setup after a reinstall without copying the whole server. + +This is not a full system backup. + +## What It Includes + +The archive includes these files when they exist: + +- SimpleSaferServer config from `/etc/SimpleSaferServer` +- the user database, secret key, encrypted secrets, alerts, and disabled timer records +- rclone config from root's rclone config folder +- msmtp config from `/etc/msmtprc` +- SimpleSaferServer-owned Samba include files + +It does not include `/etc/fstab`. That is intentional. Restoring an old mount table can make a server fail to boot or mount the wrong disk. + +It also does not include the full backup drive data, operating system files, package state, or unmanaged Samba config. + +## Automatic Backup + +After setup is complete, SimpleSaferServer creates a self-backup on the configured backup drive. + +It also installs a daily `setup_self_backup.timer`. This timer runs one minute before the normal cloud backup time, so the fresh self-backup archive can be copied to your cloud target by the normal cloud backup. + +Archives are stored here on the mounted backup drive: + +```text +SimpleSaferServer-self-backups/ +``` + +Only the newest 30 archives are kept by the scheduled command. + +## Manual Backup + +Run this as root: + +```bash +sudo /opt/SimpleSaferServer/.venv/bin/python /opt/SimpleSaferServer/scripts/setup_self_backup.py create +``` + +To list existing archives: + +```bash +sudo /opt/SimpleSaferServer/.venv/bin/python /opt/SimpleSaferServer/scripts/setup_self_backup.py list +``` + +To write to a specific mounted drive path: + +```bash +sudo /opt/SimpleSaferServer/.venv/bin/python /opt/SimpleSaferServer/scripts/setup_self_backup.py create --destination /media/backup +``` + +## Restore During Setup + +Use this after reinstalling SimpleSaferServer, before finishing the setup wizard. + +1. Mount the backup drive. +2. Find the archive under `SimpleSaferServer-self-backups/`. +3. Restore it: + +```bash +sudo /opt/SimpleSaferServer/.venv/bin/python /opt/SimpleSaferServer/scripts/setup_self_backup.py restore /media/backup/SimpleSaferServer-self-backups/setup-self-backup-YYYYMMDDTHHMMSSZ.tar.gz +``` + +By default, restore sets `system.setup_complete` to `false`. This lets the setup wizard reinstall services, timers, Samba share setup, and the managed backup-drive setup for the current machine. + +After the restore, open the setup wizard and finish setup. Check the backup drive step carefully. The self-backup does not restore `/etc/fstab`, so the current backup drive still needs to be mounted and registered by setup. + +## Restore On A Running Install + +The restore command is mainly meant for reinstall recovery. If you run it on an already working install, restart SimpleSaferServer afterwards so the web app reloads the restored files. + +Only use `--preserve-setup-complete` when you understand that setup will not be forced to rerun service and timer installation: + +```bash +sudo /opt/SimpleSaferServer/.venv/bin/python /opt/SimpleSaferServer/scripts/setup_self_backup.py restore /path/to/archive.tar.gz --preserve-setup-complete +``` diff --git a/docs/task_detail.md b/docs/task_detail.md index bd870e5..537e777 100644 --- a/docs/task_detail.md +++ b/docs/task_detail.md @@ -12,6 +12,9 @@ The Task Detail page shows information and logs for a specific scheduled task. ## Controls - **Start**: Button to start the task (confirmation required). - **Stop**: Button to stop the task (confirmation required). +- **Automatic Runs**: On `Check Mount`, `Drive Health Check`, and `Cloud Backup`, this switch turns + scheduled runs on or off. Off permanently disables that task's systemd `.timer`; On enables it + again. Manual Start still starts the task immediately. - **Disable Schedule**: Opens a modal for disabling automatic runs for 1 hour, 6 hours, 24 hours, 7 days, or permanently. This disables the systemd `.timer` only; manual Start still starts the `.service`. diff --git a/index.html b/index.html index 538ee2f..e54ed77 100644 --- a/index.html +++ b/index.html @@ -159,6 +159,7 @@
This page does not exist, or the link is out of date.
+{{ requested_path }}
+