ikuwow
10/16/2016 - 12:36 PM

Remove Old Timemachine Backup Script

Remove Old Timemachine Backup Script

#!/bin/bash

cd /Volumes/Time\ Machine/Backups.backupdb/Ikuo’s\ Mac\ mini

BACKUPS=(\
    2015-03-23-093603
    2015-04-13-032009
    2015-05-11-005904
    2015-06-01-000440
    2015-07-06-075631
    2015-08-03-004144
    2015-09-07-003916
    2015-10-05-000135
    2015-11-02-013219
    2015-12-07-002540
)

for BACKUP in ${BACKUPS[@]}; do
    if [ -d $BACKUP ]; then
        tmutil delete $BACKUP
    fi
done