You are here: Home / LBN / Up2date / Cloud Computing / BastionLinux 13 / python-virt-back-0.1.0-2.lbn13.noarch

python-virt-back-0.1.0-2.lbn13.noarch

Package Attributes
RPM  python-virt-back-0.1.0-2.lbn13.noarch.rpm Architecture  noarch Size  43748 Created  2017/08/04 11:08:35 UTC
Package Specification
Summary virt-back: A backup utility for QEMU, KVM, XEN, and Virtualbox guests
Group Application/Internet
License ZPL
Home Page http://pypi.python.org/packages/source/v/virt-back/virt-back-0.1.0.tar.gz
Description

A backup utility for QEMU, KVM, XEN, and Virtualbox guests. Virt-back is a python application that uses the libvirt api to safely shutdown, gzip, and restart guests. The backup process logs to syslog for auditing and virt-back works great with cron for scheduling outages.

Note that there is a --amount flag which controls the number of generations kept. The default number is 3 generations.

Example cronjob:

  1. 2 1 /usr/bin/virt-back --path=/var/backups --quiet --backup vm1 15 23 5 /usr/bin/virt-back --quiet --backup vm2

Virt-back guest restore procedure

In this guide our guest vm2 has failed with a major corruption and we would like to restore from our backups. We have our running production guest images in /KVMROOT and our virt-back guest backups in /KVMBACK.

Overview:

Ensure the guest is shut off. move the bad image file out of the way untar the virt-back backup into place power up the guest

Detailed Procedure:

Verify the guest is shut off by running:

virt-back --info-all

We noticed that vm2 was still running so we invoked:

virt-back --shutdown vm2

Move the corrupted image file out of the way:

mv /KVMROOT/vm2.img /KVMROOT/vm2.img.NFG

Unzip and unarchive the backup using the following command (note --strip depends on your original --path depth):

sudo tar -xzvf /KVMBACK/vm2.tar.gz -C /KVMROOT --strip 1

When the untar completes, start the guest:

virt-back --create vm2

Requires
rpmlib(PayloadFilesHavePrefix)  
rpmlib(FileDigests)  
/bin/sh  
rpmlib(CompressedFileNames)  
/usr/bin/python2.6  
rpmlib(PartialHardlinkSets)  
rpmlib(PayloadIsXz)  
Provides
python-virt-back

Document Actions