This document is a guide to backing up Abiquo. Every Abiquo installation is different so you must ensure that your backup configuration is appropriate for your installation. This guide gives a general explanation of which parts of Abiquo need to be backed up and how to do this manually and with Rsnapshot.
...
Create backups
Abiquo Server, Remote Services and V2V
...
Code Block |
---|
$ cp /etc/fstab /path/to/backup/fstab |
Restore
...
backups
Abiquo Server, Remote Services, and V2V
Restore Abiquo properties:
...
Code Block |
---|
$ /etc/init.d/redis stop $ cp /path/to/backup/redis/dump.rdb /var/lib/redis $ /etc/init.d/redis start |
Abiquo
...
remote services
Restore /etc/fstab configuration:
...
Code Block |
---|
$ /etc/init.d/dhcpd stop $ cp /path/to/backup/dhcp/dhcpd.leases* /var/lib/dhcpd/ $ /etc/init.d/dhcpd start |
Restart Abiquo
Now you can restart the Abiquo Tomcat daemon:
Code Block |
---|
$ service abiquo-tomcat restart |
Configure a
...
remote backup server
Now we will describe how to configure a remote CentOS server to do the backups via rsnapshot. In this example we have an Abiquo Server (10.60.20.100) and an Abiquo Remote Services Server (10.60.20.101).
...
First of all, on the backup server, install rsnapshot (you may need to install RPMForge repositories (first, you can follow the follow the CentOS RPMForge guide) and then install rsnapshot:
Code Block |
---|
$ rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt $ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm $ rpm -i rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm $ yum -y install rsnapshot |
...
As you can see in the configuration above, we use scripts in order to do MySQL and Redis dumps. The scripts are stored on the backup server. Put them under your /opt/backups/ directory, and modify the HOST variable to suit your needs:
...
backup_mysql.sh
Code Block | ||
---|---|---|
#!/bin/bash HOST="10.60.20.100" MYSQL_DB="kinton" FILE=${MYSQL_DB}.$(date +"%Y%m%d-%H%M%S").sql.gz # dump the database and gzip it ssh root@${HOST} "mysqldump ${MYSQL_DB}" | gzip -9 > ${FILE} | ||
Code Block | ||
borderStyle | solidtitle |
backup_redis.sh
Code Block |
---|
#!/bin/bash HOST="10.60.20.101" REDIS_DUMP="/var/lib/redis/dump.rdb" FILE=dump.$(date +"%Y%m%d-%H%M%S").rdb.gz # dump the database and gzip it ssh root@${HOST} "redis-cli save" ssh root@${HOST} "cat ${REDIS_DUMP}" | gzip -9 > ${FILE} |
...