Summary
The immutable-backups.sh script currently compares all files from the source directory against every previous backup, resulting in very long runtimes, especially as the number of previous backups increases. To optimize this process, introduce a new optional --modified-within=AGE flag for the backup command.
Details
- The new flag should work for both full and incremental backups.
- The flag should pass its value as
--max-age=AGE to rclone, restricting the set of files considered to those modified within the provided AGE (e.g., 30d, 72h, 12w), using rclone's standard AGE syntax.
- When the flag is not provided, default behavior must be unchanged.
- Update help text and usage examples in the script documentation to reflect the new flag.
- Ensure compatibility with rclone v1.55.1 and later.
Acceptance Criteria
Additional Notes
- One full baseline backup has already been performed; safety warnings about skipping old files are not required for initial deployment.
- No other optimization flags (such as compare-dest limits) are requested at this time.
If any of the above requirements are unclear, please ask for clarification in this issue before starting implementation.
Summary
The
immutable-backups.shscript currently compares all files from the source directory against every previous backup, resulting in very long runtimes, especially as the number of previous backups increases. To optimize this process, introduce a new optional--modified-within=AGEflag for the backup command.Details
--max-age=AGEto rclone, restricting the set of files considered to those modified within the provided AGE (e.g., 30d, 72h, 12w), using rclone's standard AGE syntax.Acceptance Criteria
--modified-within=AGEis accepted for both full and incremental backups inimmutable-backups.sh.--max-age.Additional Notes
If any of the above requirements are unclear, please ask for clarification in this issue before starting implementation.