Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds write-only support for increased security. Skips faux 'lost+found' db that breaks script. #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Yggdrasil
Copy link

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.

…ipt only writes new backups and creates new buckets. [SYSPRJ-36]

No attempts are made to delete data from S3. Set this to true when the credentials you provide don't have the rights to perform deletions. This is a handy way to prevent disaster should someone malicious gain access to them. With correctly restricted IAM permissions they won't be able to delete existing backups. You'll need to use a separate server and credentials to purge old backups.
…tting the datadir on its own volume with ext3/4 fs. Trying to export this non-existent db breaks the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant