aboutsummaryrefslogtreecommitdiff
path: root/docker/xtrabackup
diff options
context:
space:
mode:
Diffstat (limited to 'docker/xtrabackup')
-rw-r--r--docker/xtrabackup/Dockerfile.j228
-rwxr-xr-xdocker/xtrabackup/backup.sh49
2 files changed, 0 insertions, 77 deletions
diff --git a/docker/xtrabackup/Dockerfile.j2 b/docker/xtrabackup/Dockerfile.j2
deleted file mode 100644
index 341a0d2f3..000000000
--- a/docker/xtrabackup/Dockerfile.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
-LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
-
-{% block xtrabackup_header %}{% endblock %}
-
-{% import "macros.j2" as macros with context %}
-
-{% if base_package_type == 'rpm' %}
-RUN yum-config-manager --enable percona-release-\*
-{% endif %}
-
-{% if base_package_type == 'deb' %}
-RUN sed -i -e '/percona/ s|^#deb |deb |' /etc/apt/sources.list
-{% endif %}
-
-{% if base_package_type in ['rpm', 'deb'] %}
- {% set xtrabackup_packages = ['percona-xtrabackup-24', 'qpress'] %}
-{% endif %}
-
-{{ macros.install_packages(xtrabackup_packages | customizable("packages")) }}
-
-COPY backup.sh /usr/local/bin/kolla_mariadb_backup.sh
-RUN chmod 755 /usr/local/bin/kolla_mariadb_backup.sh
-
-CMD /usr/local/bin/kolla_mariadb_backup.sh
-
-{% block xtrabackup_footer %}{% endblock %}
-{% block footer %}{% endblock %}
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
-