Difference between revisions of "VM Backup"

From DHVLab

 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:OVirt Engine Cluster]]
+
[[Category:OVirt]]
 +
[[Category:Backup]]
 
Unfortunately oVirt does not allow you to automatically create VM backups without downtime. The process to create one first
 
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.
 
creates a snapshot, creates a new VM with it and exports this VM to the export domain you specified.

Latest revision as of 18:59, 10 September 2016

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