From 8183b65f53cc4eb0b40bd0cda76110ef7f9eceb2 Mon Sep 17 00:00:00 2001 From: rick Date: Wed, 18 Dec 2019 22:28:36 +0100 Subject: [PATCH] fixed rm command, edit days of keeped backup -> rm command: {} contains already the full path for deletion -> days to keep: local nas script delets files which are older than 30 days.. cause of this rsync keeps syncing old files everyday --- lxc_backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc_backup.sh b/lxc_backup.sh index dc0d8d6..67ccaa6 100755 --- a/lxc_backup.sh +++ b/lxc_backup.sh @@ -27,8 +27,8 @@ do ${lxccmd} delete ${container}-backup done -#housekeeping - keep last 38 days -find ${backuppath} -mtime +38 -exec rm -f ${backuppath}/{} \; +#housekeeping - keep last 28 days +find ${backuppath} -mtime +28 -exec rm -f {} \; #own data for backupuser chown -R ${backupuser}:${backupuser} ${backuppath}