Skip to content

Commit

Permalink
Merge branch 'master' of github.com:NewEraSystems/mysql-backup-to-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
sadortun committed Oct 26, 2020
2 parents 9224d0e + 417d626 commit 3d1a8d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ To run a backup, launch `mysql-backup` image as a container with the correct par
For example:

````bash
docker run -d --restart=always -e DB_DUMP_TARGET=s3://my-bucket/ -e AWS_ACCESS_KEY_ID=my-aws-key -e AWS_SECRET_ACCESS_KEY=my-aws-secret -e DB_SERVER=my-db-container -v /local/file/path:/db databack/mysql-backup
docker run -d --restart=always -e DB_DUMP_TARGET=s3://my-bucket/ -e AWS_ACCESS_KEY_ID=my-aws-key -e AWS_SECRET_ACCESS_KEY=my-aws-secret -e DB_SERVER=my-db-container databack/mysql-backup
````

The above will run a dump every 60 minutes, beginning at the next 2330 local time, from the database accessible in the container `my-db-container`.
Expand Down
2 changes: 2 additions & 0 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ function do_dump() {
s3cmd ${AWS_ENDPOINT_OPT} --host=$AWS_ENDPOINT_URL --access_key=${AWS_ACCESS_KEY_ID} --secret_key=${AWS_SECRET_ACCESS_KEY} put $ONEDB_ZIP "${DB_DUMP_TARGET}"
[ $? -ne 0 ] && return 1

rm $ONEDB_ZIP
rm $ONEDB_SQL
done


Expand Down

0 comments on commit 3d1a8d9

Please sign in to comment.