From aec6d1b2f66e01e2941e3fa550278717fceb8614 Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Wed, 5 Jul 2023 22:38:30 +0100 Subject: [PATCH] Update backup.sh --- backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 8eb8f85a..ea78718f 100755 --- a/backup.sh +++ b/backup.sh @@ -114,9 +114,9 @@ if [[ $* == *--auto* ]]; then rm -rf ${tmp_dir} - find /rmmbackups/daily/ -maxdepth 1 -mtime +14 -type d -exec rm -rv {} \; - find /rmmbackups/weekly/ -maxdepth 1 -mtime +60 -type d -exec rm -rv {} \; - find /rmmbackups/monthly/ -maxdepth 1 -mtime +380 -type d -exec rm -rv {} \; + find /rmmbackups/daily/ -type f -mtime +14 -name '*.tar' -execdir rm -- '{}' \; + find /rmmbackups/weekly/ -type f -mtime +60 -name '*.tar' -execdir rm -- '{}' \; + find /rmmbackups/monthly/ -type f -mtime +380 -name '*.tar' -execdir rm -- '{}' \; echo -ne "${GREEN}Backup Completed${NC}\n" exit