Changes

Jump to: navigation, search

stoney conductor: VM Backup

311 bytes added, 09:09, 10 January 2014
/* How to manually restore a machine from backup */
diff -Naur /etc/libvirt/qemu/${machinename}.xml /var/virtualization/retain/vm-persistent/${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
domain="<DOMAIN>" # For example domain="stoney-cloud.org"
ldapsearch -H ldaps://ldapm.${domain} -b "sstVirtualMachine=${machinename},ou=virtual machines,ou=virtualization,ou=services,dc=stoney-cloud,dc=org" -s sub -x -D "cn=Manager,dc=stoney-cloud,dc=org" -W "(objectclass=*)" > /tmp/${machinename}.ldif
diff -Naur /tmp/${machinename}.ldif /var/virtualization/retain/vm-persistent/${vmpool}/${machinename}/${currentdate}/${machinename}.ldif.${backupdate}
</source>
and '''edit the file at the retain location''' according to your needs.
''' Now you are entering the critical part. You won't be able to undo the following steps'''
Undefine the machine
<source lang='bash'>
virsh undefine ${machinename}
</source>
== Next steps ==
486
edits