mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
use HOST and PORT for table lookup
This commit is contained in:
parent
e98c5cdf2c
commit
596c121913
2 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
sudo: required
|
||||
dist: xenial
|
||||
dist: trusty
|
||||
language: bash
|
||||
|
||||
before_script:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
DATE=$(date +%Y%m%d%H%M)
|
||||
echo "=> Backup started at $DATE"
|
||||
databases=$(mysql -u "$MYSQL_USER" -p"$MYSQL_PASS" -e "SHOW DATABASES;" | tr -d "| " | grep -v Database)
|
||||
databases=$(mysql -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" -e "SHOW DATABASES;" | tr -d "| " | grep -v Database)
|
||||
for db in $databases
|
||||
do
|
||||
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]]
|
||||
|
|
Loading…
Reference in a new issue