1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-28 08:52:00 +02:00

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

Co-authored-by: Florian Lindner <florian.lindner@ipvs.uni-stuttgart.de>
This commit is contained in:
Florian Lindner 2020-06-15 07:28:42 +02:00 committed by GitHub
parent a276c5706b
commit 36890de7f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ function backup() {
--delete-days) --delete-days)
shift shift
if [[ "${1}" =~ ^[0-9]+$ ]]; then 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 else
echo "Parameter of --delete-days is not a number." echo "Parameter of --delete-days is not a number."
fi fi