Commit d25579e3 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Bugfix and create dump for all databases

parent 8be6b861
......@@ -17,6 +17,7 @@ mkdir -p $COPY_TO
function database_backup ()
{
if which mysql >/dev/null; then
mysqldump -Q -q -e -R --add-drop-table -A -u $USER -p$PASSWORD > $COPY_TO/all.db
for db in $(echo 'SHOW DATABASES;'|mysql -u$USER -p$PASSWORD -h$HOST|grep -v '^Database$'|grep -v "^performance_schema" |grep -v "^information_schema" |grep -v "^mysql");
do
mysqldump \
......
......@@ -12,7 +12,7 @@ function sync_backup ()
do
if [[ $next != \#* ]]; then
echo $next
rsync --dry-run -az --progress $REMOTE:$next $next
rsync --dry-run -az --progress $REMOTE:$next ${next%*/*}
[[ ! $? -eq 0 ]] && read
fi
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment