Difference between revisions of "VM Backup"
From DHVLab
Wiki admin (talk | contribs) (Created page with "Category:OVirt Engine Cluster") |
Wiki admin (talk | contribs) |
||
Line 1: | Line 1: | ||
[[Category:OVirt Engine Cluster]] | [[Category:OVirt Engine Cluster]] | ||
+ | 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 [https://github.com/wefixit-AT/oVirtBackup wefixit-AT]. | ||
+ | == Install oVirtBackup == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | wget -O /opt/oVirtBackup.zip https://github.com/wefixit-AT/oVirtBackup/archive/master.zip | ||
+ | cd /opt | ||
+ | unzip oVirtBackup.zip | ||
+ | mv oVirtBackup-master oVirtBackup | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Configuring oVirtBackup == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | 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 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Adding cron-job == | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | #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 | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="text"> | ||
+ | #you can use http://crontab-generator.org to generate your schedule | ||
+ | YOUR_SCHEDULE /usr/local/sbin/ovirtbackup.sh >> /var/log/ovirtbackup.log | ||
+ | </syntaxhighlight> |
Revision as of 17:52, 9 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
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