Holland is an application which is used for MySQL Backups.
Below are some steps to Install and Configure Holland to backup multiple datasets.
First off, download the key.
wget http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_14.04/Release.key -O - | sudo apt-key add -
Add Holland to the Repo lists..
echo 'deb http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_14.04/ ./' > /etc/apt/sources.list.d/holland.list
Make sure you change 14.04 to the version of Ubuntu you are using. for both steps above.
apt-get update && apt-get install holland-common holland-mysqldump
How to get Holland to backup datasets from different MySQL instances (db01 and db02).
cp /etc/holland/backupsets/default.conf /etc/holland/backupsets/db01.conf;cp /etc/holland/backupsets/db01.conf /etc/holland/backupsets/db02.conf
root@web01:~# ls -l /etc/holland/backupsets/db*
-rw-r--r-- 1 root root 1466 Nov 17 10:53 /etc/holland/backupsets/db01.conf -rw-r--r-- 1 root root 1466 Nov 17 10:53 /etc/holland/backupsets/db02.conf
In each of these files you will need to perform the changes below:
backups-to-keep = 5 databases = * exclude-tables = mysql.events [mysql:client] user = root host = mydatabasehost.example.com OR 123.456.789.123 password = MySecurePa$$word
The configuration above will keep 5 sets of holland backups, backup all databases and tables EXCEPT `mysql`.`events`
The settings under the [mysql:client] block will need to be changed on both servers to give correct login details to the database host.
Now we have the datasets created we need to amend the /etc/holland/holland.conf to actually backup these datasets rather than the default. The backup_directory is where you would like the backups to be stored once then have been processed. The backupsets is which config files to read and perform backups on.
backup_directory = /var/backups/mysql backupsets = db01, db02
That’s it! Configuration complete! All thats left to do is run the backup!
Here are some more useful holland commands.
backup (bk) Run backups for active backupsets help (h) Show help for a command list-backups (lb) List available backups list-plugins (lp) List installed plugins mk-config (mc) Generate a config file for a backup plugin purge (pg) Purge the requested job runs
If you want to configure holland to backup daily, then you can create a cronjob to run at a specific time.
echo '00 02 * * * holland bk' > /etc/cron.d/holland
This will run holland at 2am daily.