Skip to content

Commit

Permalink
Merge pull request #2 from silinternational/feat-dumpargs
Browse files Browse the repository at this point in the history
Feat dumpargs
  • Loading branch information
fillup authored Apr 4, 2018
2 parents 184c184 + c5394a9 commit 13322bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apk update \

COPY dockerbuild/rsyslog.conf /etc/rsyslog.conf

RUN wget https://raw.githubusercontent.com/silinternational/runny/0.1/runny -O /usr/local/bin/runny \
RUN wget https://raw.githubusercontent.com/silinternational/runny/0.2/runny -O /usr/local/bin/runny \
&& chmod +x /usr/local/bin/runny

COPY application/ /data/
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Service to backup and/or restore mysql databases using S3

`MYSQL_PASSWORD=`

`MYSQL_DUMP_ARGS=` (optional) additional arguments to the mysqldump command, e.g., `--max_allowed_packet=50M`

`AWS_ACCESS_KEY=` used for S3 interactions

`AWS_SECRET_KEY=` used for S3 interactions
Expand Down
2 changes: 1 addition & 1 deletion application/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ for dbName in ${DB_NAMES}; do
logger -p user.info "backing up ${dbName}..."

start=$(date +%s)
runny $(mysqldump -h ${MYSQL_HOST} -u ${MYSQL_USER} -p"${MYSQL_PASSWORD}" ${dbName} > /tmp/${dbName}.sql)
runny $(mysqldump -h ${MYSQL_HOST} -u ${MYSQL_USER} -p"${MYSQL_PASSWORD}" ${MYSQL_DUMP_ARGS} ${dbName} > /tmp/${dbName}.sql)
end=$(date +%s)
logger -p user.info "${dbName} backed up ($(stat -c %s /tmp/${dbName}.sql) bytes) in $(expr ${end} - ${start}) seconds."

Expand Down

0 comments on commit 13322bf

Please sign in to comment.