From d0dd6b8e41dd9491498563b7939befc32ec63a07 Mon Sep 17 00:00:00 2001 From: Avi Deitcher Date: Fri, 17 Aug 2018 11:19:13 +0300 Subject: [PATCH] Fix typos in README and comments --- README.md | 10 +++++----- entrypoint | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2b9bea7..aeb8f33 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ docker run -d --restart=always -e DB_USER=user123 -e DB_PASS=pass123 -e DB_DUMP_ ### Dump Target The dump target is where you want the backup files to be saved. The backup file *always* is a gzipped file the following format: -`db_backup_YYYYMMDDHHmm.sql.gz` +`db_backup_YYYYMMDDHHmm.gz` Where: @@ -179,15 +179,15 @@ __You should consider the [use of `--env-file=`](https://docs.docker.com/engine/ Examples: -1. Restore from a local file: `docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=/backup/db_backup_201509271627.sql.gz -v /local/path:/backup deitch/mysql-backup` -2. Restore from an SMB file: `docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=smb://smbserver/share1/backup/db_backup_201509271627.sql.gz deitch/mysql-backup` -3. Restore from an S3 file: `docker run -e DB_SERVER=gotodb.example.com -e AWS_ACCESS_KEY_ID=awskeyid -e AWS_SECRET_ACCESS_KEY=secret -e AWS_DEFAULT_REGION=eu-central-1 -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=s3://bucket/path/db_backup_201509271627.sql.gz deitch/mysql-backup` +1. Restore from a local file: `docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=/backup/db_backup_201509271627.gz -v /local/path:/backup deitch/mysql-backup` +2. Restore from an SMB file: `docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=smb://smbserver/share1/backup/db_backup_201509271627.gz deitch/mysql-backup` +3. Restore from an S3 file: `docker run -e DB_SERVER=gotodb.example.com -e AWS_ACCESS_KEY_ID=awskeyid -e AWS_SECRET_ACCESS_KEY=secret -e AWS_DEFAULT_REGION=eu-central-1 -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=s3://bucket/path/db_backup_201509271627.gz deitch/mysql-backup` ### Restore when using docker-compose `docker-compose` automagically creates a network when started. `docker run` simply attaches to the bridge network. If you are trying to communicate with a mysql container started by docker-compose, you'll need to specify the network in your command arguments. You can use `docker network ls` to see what network is being used, or you can declare a network in your docker-compose.yml. #### Example: -`docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=/backup/db_backup_201509271627.sql.gz -v /local/path:/backup --network="skynet" deitch/mysql-backup` +`docker run -e DB_SERVER=gotodb.example.com -e DB_USER=user123 -e DB_PASS=pass123 -e DB_RESTORE_TARGET=/backup/db_backup_201509271627.gz -v /local/path:/backup --network="skynet" deitch/mysql-backup` ### Using docker (or rancher) secrets Environment variables used in this image can be passed in files as well. This is useful when you are using docker (or rancher) secrets for storing sensitive information. diff --git a/entrypoint b/entrypoint index e3c9b59..0ceb693 100755 --- a/entrypoint +++ b/entrypoint @@ -75,7 +75,7 @@ declare -A uri if [[ -n "$DB_RESTORE_TARGET" ]]; then - # Execute additional scripts for pre backup restore porcessing. For example, + # Execute additional scripts for pre backup restore processing. For example, # uncompress a tarball that contains the tarballs for the sql dump and a # wordpress installation. if [ -d /scripts.d/pre-restore/ ]; then @@ -116,7 +116,7 @@ if [[ -n "$DB_RESTORE_TARGET" ]]; then echo "Could not find restore file $DB_RESTORE_TARGET" exit 1 fi - # Execute additional scripts for post backup restore porcessing. For example, + # Execute additional scripts for post backup restore processing. For example, # uncompress a tarball that contains the files of a wordpress installation if [ -d /scripts.d/post-restore/ ]; then for i in $(ls /scripts.d/post-restore/*.sh); do @@ -183,7 +183,7 @@ else # make the dump mysqldump -h $DB_SERVER -P $DB_PORT $DBUSER $DBPASS $DB_LIST $DUMPVARS | gzip > ${TMPDIR}/${TARGET} - # Execute additional scripts for post porcessing. For example, create a new + # Execute additional scripts for post processing. For example, create a new # backup file containing this db backup and a second tar file with the # contents of a wordpress install. if [ -d /scripts.d/post-backup/ ]; then