Permalink
Browse files

better & faster mysqldumps

  • Loading branch information...
Schnitzel committed Dec 1, 2018
1 parent 7b6a391 commit 8031181afc3dc852cba06585c477d0dcfe3b8b75
Showing with 2 additions and 2 deletions.
  1. +1 −1 images/mariadb-galera/mysql-backup.sh
  2. +1 −1 images/mariadb/mysql-backup.sh
@@ -78,7 +78,7 @@ function backup_database(){
backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz"
output="${output}${database} => $backup_file\n"
echo_status "...backing up $count of $total databases: $database"
$(mysqldump $(mysql_login) $database | gzip -9 > $backup_file)
$(mysqldump --events --routines --quick --add-locks --no-autocommit --single-transaction $(mysql_login) $database | gzip -9 > $backup_file)
}

function backup_databases(){
@@ -78,7 +78,7 @@ function backup_database(){
backup_file="$BACKUP_DIR/$TIMESTAMP.$database.sql.gz"
output="${output}${database} => $backup_file\n"
echo_status "...backing up $count of $total databases: $database"
$(mysqldump $(mysql_login) $database | gzip -9 > $backup_file)
$(mysqldump --events --routines --quick --add-locks --no-autocommit --single-transaction $(mysql_login) $database | gzip -9 > $backup_file)
}

function backup_databases(){

0 comments on commit 8031181

Please sign in to comment.