Skip to content

feat: manual backup option#713

Merged
nicotsx merged 1 commit intomainfrom
feat/manual-backup-option
Mar 26, 2026
Merged

feat: manual backup option#713
nicotsx merged 1 commit intomainfrom
feat/manual-backup-option

Conversation

@nicotsx
Copy link
Copy Markdown
Owner

@nicotsx nicotsx commented Mar 26, 2026

Closes #710

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79b3a883-d0bf-45e9-a236-88b2b31719aa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot
Copy link
Copy Markdown

dosubot bot commented Mar 26, 2026

Related Documentation

1 document(s) may need updating based on files changed in this PR:

Zerobyte's Space

Repositories in Zerobyte: Types, Architecture, and Operations
View 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
 

[Accept] [Decline]

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

@nicotsx nicotsx merged commit 866a3c6 into main Mar 26, 2026
9 checks passed
@nicotsx nicotsx deleted the feat/manual-backup-option branch March 26, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Manual backup option

1 participant