Adds write-only support for increased security. Skips faux 'lost+found' db that breaks script. #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds write-only support to allow for stricter S3 IAM privileges. The IAM credentials used with the script may not have the privileges to delete objects from S3 buckets, in order to impede an attacker on a compromised host from simply deleting backup objects. Unfortunately S3 allows overwriting of objects via the same PutObject privilege so this is just an extra hurdle. If you can write you can overwrite, just not delete, so enable bucket versioning as well. Also you need some other script with other credentials (on some other host) to rotate the old backups, or you need to set up lifecycle-management rules on the bucket.
Skips faux 'lost+found' db, which can break the script. If MySQL's datadir is on a separate volume with an ext3/ext4 filesystem MySQL will assume the mandatory lost+found directory is a database, which it obviously is not. When the script tries to mysqldump this db it breaks, eventually filling /tmp with incomplete dumps. A simple solution is to not try to backup this 'db' at all.