浏览代码

Make delete-days delete only files with mailcow-* in backup location (#3609)

Co-authored-by: Florian Lindner <florian.lindner@ipvs.uni-stuttgart.de>
Florian Lindner 5 年之前
父节点
当前提交
36890de7f4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      helper-scripts/backup_and_restore.sh

+ 1 - 1
helper-scripts/backup_and_restore.sh

@@ -130,7 +130,7 @@ function backup() {
     --delete-days)
       shift
       if [[ "${1}" =~ ^[0-9]+$ ]]; then
-        find ${BACKUP_LOCATION}/* -maxdepth 0 -mmin +$((${1}*60*24)) -exec rm -rvf {} \;
+        find ${BACKUP_LOCATION}/mailcow-* -maxdepth 0 -mmin +$((${1}*60*24)) -exec rm -rvf {} \;
       else
         echo "Parameter of --delete-days is not a number."
       fi