Skip to content

Instantly share code, notes, and snippets.

View gottaloveit's full-sized avatar

Joe Passavanti gottaloveit

View GitHub Profile
@gottaloveit
gottaloveit / run-innobackupex.sh
Last active August 29, 2015 14:08 — forked from jmfederico/run-xtrabackup.sh
Updated options to make it able to run automatically, non interactive, suitable for daily or even multiple per day MySQL backups using cron, and Percona's Xtrabackup. Option to backup slave replication also, and amount of days to keep backups on the disk or wherever you set the path. Easy options at the top of the file, set them, set cron, and y…
#!/bin/sh
#can change to /tmp, /var has tons of space on our servers
TMPFILE="/var/tmp/innobackupex-runner.$$.tmp"
MYSQL_USER=XXX
MYSQL_PASS=XXX
BACKDIR=/var/backups/mysql
FULL_BACKUP_DIRNAME=full
INCR_BACKUP_DIRNAME=incr