mirror of
https://github.com/fruworg/infrastructure.git
synced 2024-11-16 05:17:17 +03:00
Update backup.sh
This commit is contained in:
parent
5a20fb48d7
commit
3b17f778e5
@ -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')"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user