Sign inSign up

clevyr/mariadb-lambda-backup

By clevyr

Updated over 6 years ago

Image
0

8.3K

clevyr/mariadb-lambda-backup repository overview

Python mysqldump

This is a Docker-compatible Python script to make a dump of a mariadb database and pushes it to an S3 bucket.

It uses Hashicorp Vault to get the authentication

This is intended to be ran under fargate or a lambda function.

Use lambda if the total database size is less than 256 MB due to disk limitations, otherwise use fargate.

Make sure the lambda or fargate container has IAM access to s3:PutObject and ses:SendEmail

Environment Variables

VariableDetailsExample
VAULT_SECRETthe secret to pull from Hashicorp's Vaultsecret/testing-mongo
VAULT_TOKENthe token used to access the vaults.7NaWxclhAr3EE22Z8guUQXw6
VAULT_HOSTthe vault instance to connect tohttps://vault.principle-two.com
BUCKET_NAMEThe S3 bucket to upload the backup top2-dev-backups
MYSQL_HOSTThe postgres host to connect to3.17.52.25
MYSQL_USERNAMEThe postgres username to authenticate withusername
MYSQL_PASSWORDThe postgres password to authenticate withpassword
SES_REGIONThe region that SES is working inus-east-1
EMAIL_FROMThe email address to send emails from[email protected]
EMAIL_TOThe list of email addresses to send to, separated by semicolons[email protected];[email protected]
MYSQL_DATABASEThe postgres database to backupdatabase_name

Tag summary

Content type

Image

Digest

Size

347.9 MB

Last updated

over 6 years ago

docker pull clevyr/mariadb-lambda-backup