Update backup.sh

This commit is contained in:
Руслан 2023-09-24 19:06:11 +06:00 committed by GitHub
parent 5a20fb48d7
commit 3b17f778e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ GDRIVE_FOLDER="/mnt/gdrive/backups"
clean_old_backups() { clean_old_backups() {
local CLEANED_FOLDER="$1" local CLEANED_FOLDER="$1"
for BACKUP_FILE in {/var/backups/infrastructure,/mnt/mega/backups}/*.tar.zst.gpg; do for BACKUP_FILE in $CLEANED_FOLDER/*.tar.zst.gpg; do
BACKUP_DATE="$(echo $BACKUP_FILE | egrep -o [0-9]{2}-[0-9]{2}-[0-9]{4} | sed -e 's/-//g')" BACKUP_DATE="$(echo $BACKUP_FILE | egrep -o [0-9]{2}-[0-9]{2}-[0-9]{4} | sed -e 's/-//g')"