Public Repository

Last pushed: a year ago
Short Description
MariaDB 10.1.19, Phusion Base, with working syslog and cron
Full Description

working syslog and cron, through "runit" mechanism.

Crontab backs up database Full @ 00:01 and then an incremental/differental against the days full every hour at half-past the hour to /backups (The idea is to mount an external volume as /backups for your container):

01 00 root /usr/bin/backup_full.sh
30
/1 * root /usr/bin/backup_incremental.sh

Full Backup:

#!/bin/bash
DATE=/bin/date +%Y-%m-%d
DATE3DAYSAGO=date --date="3 days ago" +%Y-%m-%d
if [ ! -d /backups/hostname ]; then
mkdir -p /backups/hostname;
fi;
rm -rf /backups/hostname/$DATE3DAYSAGO
xtrabackup --backup --password=mysql --target-dir=/backups/hostname/base.$DATE

Incremental:

#!/bin/bash
DATE=/bin/date +%Y-%m-%d
DATETIME=/bin/date +%Y-%m-%d-%H-%M
xtrabackup --backup --password=mysql --incremental-basedir=/backups/hostname/base.$DATE --target-dir=/backups/hostname/incremental.$DATETIME

Should you wish to modify the build, go check out https://github.com/kimattree/mariadb-xtra-cron

Docker Pull Command
Owner
pk007za

Comments (0)