VM Backup

From DHVLab

Revision as of 19:18, 9 September 2016 by Wiki admin (talk | contribs)

Unfortunately oVirt does not allow you to automatically create VM backups without downtime. The process to create one first creates a snapshot, creates a new VM with it and exports this VM to the export domain you specified. For further information consider wefixit-AT.

Install oVirtBackup

#oVirt Python SDK is required
yum install ovirt-engine-sdk-python

wget -O /opt/oVirtBackup.zip https://github.com/wefixit-AT/oVirtBackup/archive/master.zip
cd /opt
unzip oVirtBackup.zip
mv oVirtBackup-master oVirtBackup

Configuring oVirtBackup

wget -O /opt/oVirtBackup/all.cfg https://raw.githubusercontent.com/linuskohl/DHVLab/master/configfiles/ovirt-engine/oVirtBackup/all.cfg

#adapt to your setup
nano -w /opt/oVirtBackup/all.cfg

Adding cron-job

#get backup script if you need additional tasks before/after export
wget -O /usr/local/sbin/ovirtbackup.sh https://github.com/linuskohl/DHVLab/raw/master/scripts/ovirt-engine/ovirtbackup.sh
chmod +x /usr/local/sbin/ovirtbackup.sh

#add cron job
crontab -e
#you can use http://crontab-generator.org to generate your schedule
YOUR_SCHEDULE /usr/local/sbin/ovirtbackup.sh >> /var/log/ovirtbackup.log