aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-10-23 14:08:35 +0100
committerMark Goddard <mark@stackhpc.com>2019-10-23 15:43:26 +0100
commit65b27d772be32738a8508ea8e6c07f74f229cdb7 (patch)
tree4c9b7812fe0317f95b7a4b1d59c4e94502aaa0fb
parente239169e13319ca51437604f152bb61d82ab81e9 (diff)
downloadkolla-65b27d772be32738a8508ea8e6c07f74f229cdb7.tar.gz
kolla-65b27d772be32738a8508ea8e6c07f74f229cdb7.zip
Fix mariabackup arguments
After switching from innobackupex to mariabackup [1] for database backups, the kolla_mariadb_backup.sh script was not modified to account for the difference in arguments between innobackupex and mariabackup. There is a compatibility mode, the documentation [2] for which covers some of the differences. The following have been changed: - Add explicit --backup argument, now required - Remove './' positional argument - not required with --stream - Remove --no-timestamp argument - only supported in innobackupex compatibility mode - Remove --incremental argument - implied by --incremental-history-name - Remove deprecated --compress argument, which requires qpress to be installed (it is not). The stream is now passed through gzip instead [3] [1] https://mariadb.com/kb/en/library/mariabackup-overview/ [2] https://mariadb.com/kb/en/library/mariabackup-options/#-innobackupex [3] https://mariadb.com/kb/en/library/using-encryption-and-compression-tools-with-mariabackup/ Change-Id: I67cff47cbf56570b8eaeb66092dd87c2769fc8a6 Closes-Bug: #1843043
-rw-r--r--docker/mariadb/backup.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/docker/mariadb/backup.sh b/docker/mariadb/backup.sh
index 8c494a5eb..a039d84e8 100644
--- a/docker/mariadb/backup.sh
+++ b/docker/mariadb/backup.sh
@@ -5,25 +5,24 @@ set -eu
# Execute a full backup
backup_full() {
echo "Taking a full backup"
- mariabackup --defaults-file=/etc/mysql/my.cnf \
- --no-timestamp \
+ mariabackup \
+ --defaults-file=/etc/mysql/my.cnf \
+ --backup \
--stream=xbstream \
- --compress \
- --history=$(date +%d-%m-%Y) ./ > \
- $BACKUP_DIR/mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs
+ --history=$(date +%d-%m-%Y) | gzip > \
+ $BACKUP_DIR/mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs.gz
}
# Execute an incremental backup
backup_incremental() {
echo "Taking an incremental backup"
- mariabackup --defaults-file=/etc/mysql/my.cnf \
- --no-timestamp \
+ mariabackup \
+ --defaults-file=/etc/mysql/my.cnf \
+ --backup \
--stream=xbstream \
- --compress \
- --incremental \
--incremental-history-name=$(date +%d-%m-%Y) \
- --history=$(date +%d-%m-%Y) ./ > \
- $BACKUP_DIR/incremental-$(date +%H)-mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs
+ --history=$(date +%d-%m-%Y) | gzip > \
+ $BACKUP_DIR/incremental-$(date +%H)-mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs.gz
}
BACKUP_DIR=/backup/