Skip to content

Instantly share code, notes, and snippets.

View xtavras's full-sized avatar

Stan Kopp xtavras

  • Berlin
View GitHub Profile
@xtavras
xtavras / run-xtrabackup.sh
Last active February 5, 2019 09:53 — forked from jmfederico/run-xtrabackup.sh
Script to create full/incremental backups with xtrabackup.
#!/bin/sh
# uses ~/.my.cnf file for credentials
TMPFILE="/tmp/xtrabackup-runner.$$.tmp"
#USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}"
BACKDIR=/srv/mysql-bak
BASEBACKDIR=$BACKDIR/base
INCRBACKDIR=$BACKDIR/incr
FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds