aboutsummaryrefslogtreecommitdiff
path: root/docker/xtrabackup/backup.sh
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-09-16 13:14:01 +0000
committerGerrit Code Review <review@openstack.org>2019-09-16 13:14:01 +0000
commitb8950dbfae16e4959e7e502b584018fc8e58eaaf (patch)
tree3ba91b21b8935d677c75b74dbcab958e9f40781d /docker/xtrabackup/backup.sh
parentb98182d9e9146144dfa711f6ee91bcca5d2708b1 (diff)
parent016c0f577c535def40dd32ddf41e6cb145a2f9b8 (diff)
downloadkolla-b8950dbfae16e4959e7e502b584018fc8e58eaaf.tar.gz
kolla-b8950dbfae16e4959e7e502b584018fc8e58eaaf.zip
Merge "Drop Percona XtraBackup in favour of MariaDB Backup"
Diffstat (limited to 'docker/xtrabackup/backup.sh')
-rwxr-xr-xdocker/xtrabackup/backup.sh49
1 files changed, 0 insertions, 49 deletions
diff --git a/docker/xtrabackup/backup.sh b/docker/xtrabackup/backup.sh
deleted file mode 100755
index f8dff8bd7..000000000
--- a/docker/xtrabackup/backup.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-set -eu
-
-# Execute a full backup
-backup_full() {
- echo "Taking a full backup"
- innobackupex --defaults-file=/etc/mysql/my.cnf \
- --no-timestamp \
- --stream=xbstream \
- --compress \
- --history=$(date +%d-%m-%Y) ./ > \
- $BACKUP_DIR/mysqlbackup-$(date +%d-%m-%Y-%s).qp.xbc.xbs
-}
-
-# Execute an incremental backup
-backup_incremental() {
- echo "Taking an incremental backup"
- innobackupex --defaults-file=/etc/mysql/my.cnf \
- --no-timestamp \
- --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
-}
-
-BACKUP_DIR=/backup/
-cd $BACKUP_DIR
-
-if [ -n $BACKUP_TYPE ]; then
- case $BACKUP_TYPE in
- "full")
- backup_full
- ;;
- "incremental")
- backup_incremental
- ;;
- *)
- echo "Only full or incremental options are supported."
- exit 1
- ;;
- esac
-else
- echo "You need to specify either full or incremental backup options."
- exit 1
-fi
-