You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Igor Diakonov
34326102a9
|
5 years ago | |
---|---|---|
.. | ||
Dockerfile | 6 years ago | |
README.md | 6 years ago | |
backup.sh | 6 years ago | |
install.sh | 10 years ago | |
run.sh | 8 years ago |
README.md
mysql-backup-s3
Backup MySQL to S3 (supports periodic backups & mutli files)
Basic usage
$ docker run -e S3_ACCESS_KEY_ID=key -e S3_SECRET_ACCESS_KEY=secret -e S3_BUCKET=my-bucket -e S3_PREFIX=backup -e MYSQL_USER=user -e MYSQL_PASSWORD=password -e MYSQL_HOST=localhost schickling/mysql-backup-s3
Environment variables
MYSQLDUMP_OPTIONS
mysqldump options (default: --quote-names --quick --add-drop-table --add-locks --allow-keywords --disable-keys --extended-insert --single-transaction --create-options --comments --net_buffer_length=16384)MYSQLDUMP_DATABASE
list of databases you want to backup (default: --all-databases)MYSQL_HOST
the mysql host requiredMYSQL_PORT
the mysql port (default: 3306)MYSQL_USER
the mysql user requiredMYSQL_PASSWORD
the mysql password requiredS3_ACCESS_KEY_ID
your AWS access key requiredS3_SECRET_ACCESS_KEY
your AWS secret key requiredS3_BUCKET
your AWS S3 bucket path requiredS3_PREFIX
path prefix in your bucket (default: 'backup')S3_FILENAME
a consistent filename to overwrite with your backup. If not set will use a timestamp.S3_REGION
the AWS S3 bucket region (default: us-west-1)S3_ENDPOINT
the AWS Endpoint URL, for S3 Compliant APIs such as minio (default: none)S3_S3V4
set toyes
to enable AWS Signature Version 4, required for minio servers (default: no)MULTI_FILES
Allow to have one file per database if setyes
default: no)SCHEDULE
backup schedule time, see explainatons below
Automatic Periodic Backups
You can additionally set the SCHEDULE
environment variable like -e SCHEDULE="@daily"
to run the backup automatically.
More information about the scheduling can be found here.