Changes

Jump to: navigation, search

stoney conductor: VM Backup

302 bytes removed, 12:51, 10 January 2014
/* How to manually restore a machine from backup */
currentdate=`date --utc +'%Y%m%dT%H%M%SZ'`
mkdir -p /var/virtualization/retain/${vmtype}/${vmpool}/${machinename}/${currentdate}
cp -p /var/backup/virtualization/${vmtype}/${vmpool}/${machinename}/${backupdate}/${machinename}.xml.${backupdate} /var/virtualization/retain/${vmtype}/${vmpool}/${machinename}/${currentdate}/
cp -p /var/backup/virtualization/${vmtype}/${vmpool}/${machinename}/${backupdate}/${machinename}.ldif.${backupdate} /var/virtualization/retain/${vmtype}/${vmpool}/${machinename}/${currentdate}/
</source>
<!--Check if there is a difference between the current XML file and the one from the backup
<source lang='bash'>
diff -Naur /etc/libvirt/qemu/${machinename}.xml /var/virtualization/retain/${vmtype}/${vmpool}/${machinename}/${currentdate}/${machinename}.xml.${backupdate}
</source>
and '''edit the file at the retain location''' according to your needs.-->
Check if there is a difference between the current LDAP entry and the one from the backup
And restore the domain from the state file from the backup location with the XML from the retain location (the one you might have edited)
<source lang='bash'>
virsh restore /var/backup/virtualization/${vmtype}/${vmpool}/${machinename}/${backupdate}/${machinename}.state.${backupdate} --xml /var/virtualization/retain/${vmtype}/${vmpool}/${machinename}/${currentdate}/${machinename}.xml.${backupdate}
</source>
486
edits