add logging
This commit is contained in:
@@ -279,10 +279,14 @@ backup:
|
||||
export WEEK_AGO=$(date -d @$(( $(date +%s) - 604800 )) +%Y-%m-%d\ %H:%M:%S);
|
||||
echo ">> Running S3 prune for Gitea backup repository"
|
||||
echo ">> Backups prior to '$WEEK_AGO' will be removed"
|
||||
echo ">> File list:"
|
||||
s3cmd ls -v $S3_REPOSITORY
|
||||
echo ">> Deleting ..."
|
||||
s3cmd ls -v $S3_REPOSITORY |
|
||||
awk -v week_ago="$WEEK_AGO" '$1 < week_ago {print $4}' |
|
||||
while read file;
|
||||
do s3cmd del -v "$file";
|
||||
echo ">> Deleted $file";
|
||||
done;
|
||||
echo ">> Completed S3 prune for Gitea backup repository"
|
||||
envFrom:
|
||||
|
Reference in New Issue
Block a user