Supress errors when pushing to S3

This commit is contained in:
Salt 2020-06-09 05:14:47 -05:00
parent 73302047a4
commit 231c704bd6

View File

@ -56,6 +56,10 @@ done
s3bucket="{{ aws_backup_bucket }}"
if command -v aws > /dev/null 2>&1 && aws s3 ls "s3://$s3bucket"; then
log "Moving files to S3 bucket $s3bucket"
aws s3 mv "$BACKUPSDIR" "s3://$s3bucket" --exclude "*.log" --storage-class STANDARD_IA --recursive
aws s3 mv "$BACKUPSDIR" "s3://$s3bucket" \
--recursive \
--only-show-errors \
--exclude "*.log" \
--storage-class STANDARD_IA
fi