From f5c4d50f0c8d6af3b03b8e9ef52b6854ad36aa9c Mon Sep 17 00:00:00 2001 From: Georg Date: Mon, 30 Aug 2021 21:03:30 +0200 Subject: Init Percona XtraBackup Signed-off-by: Georg --- scripts/sh/xtrabackup/run_full.sh | 5 +++++ scripts/sh/xtrabackup/run_incremental.sh | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 scripts/sh/xtrabackup/run_full.sh create mode 100644 scripts/sh/xtrabackup/run_incremental.sh diff --git a/scripts/sh/xtrabackup/run_full.sh b/scripts/sh/xtrabackup/run_full.sh new file mode 100644 index 0000000..dd3d1bd --- /dev/null +++ b/scripts/sh/xtrabackup/run_full.sh @@ -0,0 +1,5 @@ +#!/bin/sh +DATE=$(date +'%d-%m-%Y') +echo $DATE > /mnt/backup/xtrabackup/current_basedate +/usr/bin/mkdir /mnt/backup/xtrabackup/full/$DATE +/opt/xtrabackup/bin/xtrabackup --backup --target-dir=/mnt/backup/xtrabackup/full/$DATE |& nc -N 127.0.0.2 2424 diff --git a/scripts/sh/xtrabackup/run_incremental.sh b/scripts/sh/xtrabackup/run_incremental.sh new file mode 100644 index 0000000..015ee5e --- /dev/null +++ b/scripts/sh/xtrabackup/run_incremental.sh @@ -0,0 +1,7 @@ +#!/bin/sh +DATE=$(date +'%d-%m-%Y') +BASEDATE=$(cat /mnt/backup/xtrabackup/current_basedate) +echo "INCREMENTAL: $DATE" +echo "BASE: $BASEDATE" +/usr/bin/mkdir /mnt/backup/xtrabackup/incremental/$DATE +/opt/xtrabackup/bin/xtrabackup --backup --target-dir=/mnt/backup/xtrabackup/incremental/$DATE --incremental-basedir=/mnt/backup/xtrabackup/full/$BASEDATE |& nc -N 127.0.0.2 2424 -- cgit v1.2.3