Add support of databases from more than one MySQL installation.
This commit is contained in:
@ -266,9 +266,24 @@ if [ "$found" = "true" -o "$pgsql_backup" = "true" -o "$mysql_backup" = "true"
|
||||
$script_dir/svn_backup.sh
|
||||
fi
|
||||
if $mysql_backup ;then
|
||||
echolog "\nGoing to backup mysql databases.. ( `$date +%H`:`$date +%M` h )"
|
||||
export mysql_user mysql_password mysql_credential_args mysql_gzip
|
||||
$script_dir/mysql_backup.sh
|
||||
|
||||
if [[ ${#mysql_credential_args_arr[@]} -gt 0 ]] ; then
|
||||
for _val in "${mysql_credential_args_arr[@]}" ; do
|
||||
|
||||
IFS=':' read -a _val_arr <<< "${_val}"
|
||||
|
||||
mysql_version="${_val_arr[0]}"
|
||||
mysql_credential_args="${_val_arr[1]}"
|
||||
|
||||
echolog "\nGoing to backup mysql databases ${_val_arr[0]} .. ( `$date +%H`:`$date +%M` h )"
|
||||
export mysql_version mysql_credential_args mysql_gzip
|
||||
$script_dir/mysql_backup.sh
|
||||
done
|
||||
else
|
||||
echolog "\nGoing to backup mysql databases.. ( `$date +%H`:`$date +%M` h )"
|
||||
export mysql_user mysql_password mysql_credential_args mysql_gzip
|
||||
$script_dir/mysql_backup.sh
|
||||
fi
|
||||
## - !!
|
||||
if $restart_apache ;then
|
||||
$ssh ${ssh_user}@$srcHost "sudo /etc/init.d/apache2 restart"
|
||||
|
Reference in New Issue
Block a user