summaryrefslogtreecommitdiff
path: root/byteback-mysql/scripts.d/Bytemyback/mysqldump-full
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2016-11-09 09:41:50 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2016-11-09 09:41:50 +0000
commit3cc8a83938cd4eae9a196375dca2fd9127f23aa0 (patch)
treefa36b507469bdb1c7b4891e336a6928c59bceab5 /byteback-mysql/scripts.d/Bytemyback/mysqldump-full
parent25f3947c16b57a9686500534e44423aab90b0bc7 (diff)
parentc68fe975ab4b47436bd90fa701b83a78793b0f32 (diff)
Merge branch 'master' into 12-fix-btrfs-path
Diffstat (limited to 'byteback-mysql/scripts.d/Bytemyback/mysqldump-full')
-rwxr-xr-xbyteback-mysql/scripts.d/Bytemyback/mysqldump-full8
1 files changed, 8 insertions, 0 deletions
diff --git a/byteback-mysql/scripts.d/Bytemyback/mysqldump-full b/byteback-mysql/scripts.d/Bytemyback/mysqldump-full
new file mode 100755
index 0000000..b4bb01e
--- /dev/null
+++ b/byteback-mysql/scripts.d/Bytemyback/mysqldump-full
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if [ "$1" == "pre" ]; then
+ HOST=`hostname`
+ echo "Dumping all databases into one backup file"
+ mkdir -p /var/backups/byteback/mysqldump-full
+ mysqldump --defaults-file=/etc/mysql/debian.cnf -A --events | gzip > /var/backups/byteback/mysqldump-full/dump.sql.gz && mauvesend -i mysqldump-split-${HOST}-low -c now -r +30h -s "mysqldump on ${HOST} has not run for over a day" --detail='Please try running manually to see what the problem was, and check the mailing list'
+fi