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.

11 lines
530 B

#!/bin/bash
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CONFIG_FILE=$DIR/_config.sh
[[ ! -r "${CONFIG_FILE}" ]] && { echo "Could not read ${CONFIG_FILE}!"; exit 1; }
set -a
. "${CONFIG_FILE}"
set +a
# Синхронизация баз (удаление, если базы есть, и создание)
echo "Dump remote databases and pipi to local mariadb" >> $log_file
mysqldump --defaults-extra-file=./.remote.my.cnf --add-drop-database --databases "${databases[@]}" | mysql --defaults-extra-file=./.my.cnf