lundi 2 février 2015

How to automatically manage backup files (with retention)


I would like to automate my backup-management workflow for certain applications, but I couldn't find out how to do this on Mac OSX 10.10:


Lets say an application creates its backup files into a directory with several subdirectories by date. Those subdirs then contain the important backup files:


backup_dir 15_01_13 backup_data.dat backup_data2.dat



15_01_14
backup_data.dat
backup_data2.dat

15_01_15
backup_data.dat
backup_data2.dat


Lightroom for example does this.


How can I automatically manage these backups if I want to delete every directory/file older than 1 week, but only if I have 2 complete backups left? I recently purchased Hazel, but it seems that the subdirectories are a problem regarding the additional check clause "if at least 2 backups are left".


Can this be done by a combination of AppleScript and Hazel or the like?


Thanks for every help!





Aucun commentaire:

Enregistrer un commentaire