Permalink
Browse files

Bugfix and create dump for all databases

  • Loading branch information...
1 parent 8be6b86 commit d25579e3e6630e80c49873a9680838136d0ff0d9 @igorpecovnik committed May 9, 2016
Showing with 2 additions and 1 deletion.
  1. +1 −0 backup and restore/backup.sh
  2. +1 −1 backup and restore/sync.sh
@@ -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

0 comments on commit d25579e

Please sign in to comment.