Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: Zerobyte's Space Repositories in Zerobyte: Types, Architecture, and OperationsView Suggested Changes@@ -454,6 +454,11 @@
When a backup job executes, any custom restic parameters configured in the schedule are passed directly to the restic backup command, in addition to the standard backup configuration.
+**Automatic vs. Manual Execution:**
+- Schedules with a `cronExpression` are automatically executed by the cron job according to their schedule
+- Manual-only schedules (with empty or null `cronExpression`) are skipped by automatic execution and must be triggered manually by users
+- After each backup execution (whether automatic or manual), the `nextBackupAt` field is recalculated based on the `cronExpression`. For manual-only schedules, this field remains `null`
+
**Backup Schedule Configuration:**
Backup schedules support two separate fields for specifying which files to include:
@@ -461,6 +466,17 @@
- **`includePatterns`**: An array of glob patterns for matching files/directories to include. These patterns are passed to restic using the `--files-from` option with newline-separated values.
Both fields are optional and can be used independently or together. When neither is specified, the backup includes the entire source directory.
+
+**Manual-Only Schedules:**
+Backup schedules can be created without a cron expression for manual-only backups:
+- When `cronExpression` is empty or null, the schedule displays "Manual only" in the UI
+- Manual-only schedules have `enabled=false` and `nextBackupAt=null` since they will not run automatically
+- Users must manually trigger backups for manual-only schedules through the UI
+
+**Validation:**
+- If a schedule has `enabled=true`, it must have a valid `cronExpression`
+- Empty `cronExpression` is only allowed when `enabled=false` (manual-only mode)
+- When creating or updating a schedule, the system validates this constraint and returns an error if violated
#### Custom Restic Parameters
Backup schedules support custom restic parameters that allow advanced users to customize restic behavior for specific backup scenarios. This is an advanced feature for users familiar with restic command-line options.
@@ -481,6 +497,16 @@
**UI:**
The create/edit schedule form includes an "Advanced" section with a textarea where users can enter custom restic parameters, one flag per line. The form provides examples and descriptions to guide users in specifying valid flags.
+
+The frequency dropdown in the create/edit schedule form includes the following options:
+- Manual only
+- Hourly
+- Daily
+- Weekly
+- Monthly
+- Custom (cron expression)
+
+Selecting "Manual only" creates a schedule without automatic execution.
## UI Components
Note: You must be authenticated to accept/decline updates. |
Closes #710