feat: backupvolume can be pruned after upload

This commit is contained in:
2023-03-01 13:28:39 +01:00
parent bab224ab96
commit 92dfd23b26
3 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,7 @@ else
fi
if [[ \ $*\ != *\ --skip-backup\ * ]]; then
rm -rf "${backup_path}"
rm -rf "${backup_path}"
for service in "${services[@]}"; do
echo "service: $service"
@ -122,5 +122,9 @@ fi
if [[ \ $*\ != *\ --skip-upload\ * ]]; then
_restic backup --host "$server_name" --tag coop-cloud "$backup_path"
fi
if [ "$REMOVE_BACKUP_VOLUME_AFTER_UPLOAD" -eq 1 ]; then
echo "Cleaning up ${backup_path}"
rm -rf "${backup_path}"
fi
fi