Commit 66fe99e0 authored by Bartłomiej Piotrowski's avatar Bartłomiej Piotrowski
Browse files

borg-client: replace mysqldump with xtrabackup

parent 6eccd333
......@@ -3,12 +3,6 @@
mysql_opts="--defaults-file={{mysql_backup_defaults}}"
backupdir="{{mysql_backup_dir}}"
for db in $(mysql $mysql_opts -e 'show databases' -s --skip-column-names); do
if [[ $db != "information_schema" && $db != "performance_schema" ]]; then
mysqldump $mysql_opts "$db" --quick --create-options --disable-keys --add-locks --add-drop-table --lock-tables --complete-insert --skip-extended-insert | gzip > "$backupdir/$db.sql.gz"
fi
done
[[ ! -d "$backupdir/xtrabackup" ]] && mkdir -p "$backupdir/xtrabackup"
rm -rf "$backupdir/xtrabackup/"*
xtrabackup $mysql_opts --backup --target-dir="$backupdir/xtrabackup"
[[ ! -d "$backupdir" ]] && mkdir -p "$backupdir"
rm -rf "$backupdir"/*
xtrabackup $mysql_opts --backup --target-dir="$backupdir"
Supports Markdown
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