Exclude logfiles in backup script

This commit is contained in:
Salt 2020-06-08 08:49:39 -05:00
parent 58d39a3f51
commit 2175fe8ada

View File

@ -56,6 +56,6 @@ 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" --storage-class STANDARD_IA --recursive
aws s3 mv "$BACKUPSDIR" "s3://$s3bucket" --exclude "*.log" --storage-class STANDARD_IA --recursive
fi