Skip to content

Add --modified-within flag to limit files by last modified date in backups #3

@emmetog

Description

@emmetog

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

  • --modified-within=AGE is accepted for both full and incremental backups in immutable-backups.sh.
  • When provided, the script only considers files modified within AGE for upload/comparison, using rclone's --max-age.
  • No behavioral change when the flag is omitted.
  • Help/usage output documents the new flag.
  • Works with rclone v1.55.1+.

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions