summaryrefslogtreecommitdiffstats
path: root/scripts/sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sh')
-rw-r--r--scripts/sh/xtrabackup/run_full.sh5
-rw-r--r--scripts/sh/xtrabackup/run_incremental.sh7
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