2

A directory contains several backup subdirectories named after their creation date and time [format: YYYY-MM-DD-HHMMSS], like:

2017-12-17-211627  2017-12-17-231437  2017-12-18-001330  2017-12-18-003359  
2017-12-18-004740  2017-12-18-010948  2017-12-17-231307  2017-12-17-235559
2017-12-18-001623  2017-12-18-003824  2017-12-18-004857

The goal is to do thinning/retention and keep only:

  • 1 folder per hour for the first 24 hours,
  • 1 folder per day for the rest of the month, and
  • 1 folder per week for older history.

Need a list of folder names to run a btrfs subvolume delete ... on, within a bash shell script.

Are there ready made tools/utilities or bash scripts that do thin these kind of directories?

Pro Backup
  • 4,924
  • For month=30 days and not touching the most recent 24 hours of backups I created a Time Machine alike bash shell-script to clean up old backup version folders. That solution is more programming related, therefore the answer is posted at a similar question on: https://stackoverflow.com/questions/28269107/delete-alike-apple-time-machine#answer-47931273 – Pro Backup Dec 21 '17 at 19:17

0 Answers0