diff options
author | Georg | 2021-08-30 21:03:30 +0200 |
---|---|---|
committer | Georg | 2021-08-30 21:03:30 +0200 |
commit | f5c4d50f0c8d6af3b03b8e9ef52b6854ad36aa9c (patch) | |
tree | c7836165b34e57a64a861e3f4ce46816e6e6c658 | |
parent | 6800ad3e4bf0054a2627bc12f2aad5704da4cdb2 (diff) | |
download | system-f5c4d50f0c8d6af3b03b8e9ef52b6854ad36aa9c.tar.gz system-f5c4d50f0c8d6af3b03b8e9ef52b6854ad36aa9c.tar.bz2 system-f5c4d50f0c8d6af3b03b8e9ef52b6854ad36aa9c.zip |
Init Percona XtraBackup
Signed-off-by: Georg <georg@lysergic.dev>
-rw-r--r-- | scripts/sh/xtrabackup/run_full.sh | 5 | ||||
-rw-r--r-- | scripts/sh/xtrabackup/run_incremental.sh | 7 |
2 files changed, 12 insertions, 0 deletions
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 |