Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.
One of the few things missing from our cloud back up offering, is the fact that you cannot backup things like your MySQL database. While it's totally possible to create an image snapshot of your server, you don't have control over the time these backups take place, and you're not able to verify them without spinning up an entire new server on that image to make sure it works as intended. Not to mention, why blow away your whole server when it's as easy as restoring one .sql backup file?!
This walkthrough will get you up and running with holland backups, and then backing up your holland back ups. (Backin' up your back ups, heh :D) For now, this walkthrough is going to assume Ubuntu, but I may update this in the future to include RHEL/CentOS (Or if someone wants to chime in!)
We will need to grab the key first
wget http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_XX.XX/Release.key -O - | sudo apt-key add -
NOTE: Here you should replace Ubuntu_XX.XX with your ubuntu release. So for Ubuntu 13.04 that command would look like this:
wget http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_13.04/Release.key -O - | sudo apt-key add -
Now let's get our list file set up for that feel free to use your favourite editor:
And add the following line in there:
deb http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_XX.XX/ ./
NOTE: again, change XX.XX with your distro so for 13.04:
deb http://download.opensuse.org/repositories/home:/holland-backup/xUbuntu_13.04/ ./
Phew! Alright, now do a quick update
And install away!
apt-get install holland-common holland-mysqldump
A couple of things need to be in place to make your life easier. If you do not already have a .my.cnf file in your /root/ directory, you should create one, that file should look like this:
As well, if you don't make any configuration changes, the default location for your backups will be /var/spool/holland/
If you're looking to change this, you would edit the file /etc/holland/holland.conf file and look for this line:
backup_directory = /var/spool/holland
Feel free to change this as you see fit. We'll just leave it there as is.
Last bit of configuration changes to consider, if you're wanting to have multiple backups present in your backups directory, check out the file /etc/holland/backupsets/default and look for the line
backups-to-keep = 1
Feel free to change this as you see fit!
Now to make sure all your configs are correct run the following command:
This should output some text for you to let you know what happened, and you should get a Backup complete message. Your holland back up directory should look like the following:
root@ubuntu:/etc/holland# ls -la /var/spool/holland/default/
drwxrwx--- 3 root root 4096 Sep 29 19:37 .
drwxr-xr-x 3 root root 4096 Sep 29 19:08 ..
drwxrwx--- 3 root root 4096 Sep 29 19:37 20130929_193720
lrwxrwxrwx 1 root root 42 Sep 29 19:37 newest -> /var/spool/holland/default/20130929_193720
lrwxrwxrwx 1 root root 42 Sep 29 19:37 oldest -> /var/spool/holland/default/20130929_193720
Setting up scheduled holland:
Last thing we need to do with holland is to schedule a time to back up our database:
This file is where you may already have some various jobs running, now the cron is customizable depending on how you want it to run, comment below if you need some help specifying a specific time, mine below as an example will run every day at 3am:
0 3 * * * root holland bk
And voila! You're all holland out!
This article isn't going to go through the whole backup installation process, if you need assistance with that please visit this awesome article to get cloud backup installed.
All that's left to do now is backup the holland directory you specified in your holland configuration, to do that, follow this article on configuring a backup from our control panel:
And now you're all backed up! Of course to restore any of these backups is super easy now using the driveclient, and then restoring them to MySQL is as easy now as running the below command, thanks to the .my.cnf file we made earlier.
mysql < NAMEOFBACKUP.sql
Hope this article has been helpful, ask below if you have any questions!
Had a situation where we wanted to deploy a server from our latest image and only then did we realise that the last image backup failed - good thing we had a contingency for our backup plan via Cloud Backup (file level backup) We set it up to where we are informed via email when backups are completed and if something goes wrong.
To install Holland on Fedora / Redhat /CentOS
1) add the EPEL repository
2) yum install holland
yum install holland holland-mysqldump
Then proceed with instructions above on configuring holland
Depending on how complex your build is, you may want to look into moving the MySql DB over to Cloud Databases. High performance, super redundant and now offers a dummy proof backup/restore via the control panel.
Should we use compression on the dump, or will that disable the benefits of the RCBU de-duplication and compression capabilities?
"Plus, our de-duplication and compression capabilities help you save space and storage costs, because there is probably a lot of duplicated data between the various dumps that were put into the sqlbackups folder. RCBU only saves the changed portions of the file."