scripts/tilserv/delbackup

7 lines
225 B
Bash
Executable File

#!/usr/bin/env -S bash -e
for i in $(zfs list -H -o name -t snapshot | grep 'bighdd\/backup\/.*@2.*'); do
if (( date - ${i##bighdd*@} >= 7 )); then
echo "$i is to be deleted since the snapshot is 7 days or older"
fi
done