Bug 590486

Summary: KVM backup scripts for file based and LVM
Product: [Fedora] Fedora Reporter: Amadeus <sha256sum>
Component: kvmAssignee: Justin M. Forbes <jforbes>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: bencollver, berrange, clalance, crobinso, ehabkost, quintela, rdieter, tburke, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-04 13:06:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Amadeus 2010-05-09 19:36:13 UTC
Fedora and RHEL doesn't have any back up programs for KVM or Xen guests.

Anyone running important guests wants to have back ups frequently.

These two scripts does exactly that.

Backup Xen virtual machines with LVM snapshots and ftplicity/duplicity
http://maff.ailoo.net/2009/07/backup-xen-virtual-machines-lvm-snapshots-ftplicity-duplicity/

backing up your xen domains
http://www.johnandcailin.com/blog/john/backing-your-xen-domains

rsnapshot also have LVM features, so perhaps that could also be useful.

Comment 1 Bug Zapper 2010-07-30 11:35:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Ben Collver 2010-11-27 23:04:37 UTC
Here is a link to some hints about using LVM snapshots to back up KVM.

http://edoceo.com/liber/kvm-lvm

Comment 3 Amadeus 2011-07-08 19:19:40 UTC
Engineering has developed a utility called virt-backup and it's available at:

http://people.redhat.com/minovotn/virt-backup/RHEL-5-RPMS/

There are RPM packages for RHEL-5 platform that supports both LZMA and that doesn't support LZMA (depending on directory you're about to download them
from).

This is test build and is not production ready. Kindly download and test the tool in your test environment and provide us the feed back.

Details on using the tool,

Version: 0.0.1

Limitations:
 - Only the image files can be backed up, no support for backing up physical
devices (partitions, LVM volumes etc.) yet
 - Users have have libvirt installed, tested with both Xen and KVM hypervisors
and working fine
 - For LZMA version of library, user must have liblzma (from xz package)
installed
 - No GUI support, only terminal/shell access

Features:
 - Can backup and restore all the guests supported by libvirt
 - You can pass hypervisor URI (like xen:/// or qemu:///system etc.) when using
the '-u' parameter on the command-line - automatically probes for hypervisor if
nothing is defined
 - Optionally can backup images for running (active) guests (not recommended
because of possible inconsistency in the image file!)
 - Optionally can enable/disable LZMA compression of backed up guests (LZMA
version only) - enabled by default.
 - Optionally you can define the names of the guests to be backed up (using
comma-separated names)

Usage:
1) to backup guests (all that are not running) using a default probed
hypervisor with default settings of LZMA (i.e. enabled when compiled):
# virt-backup backup -l pathToStoreBackupGuestImages
2) to backup 2 guest (named guest1 and guest2):
# virt-backup backup -l pathToStoreBackupGuestImages -d guest1,guest2
3) to restore the guest images from source path (path with the backed up images
and XML files) to destination path:
virt-backup restore -l sourcePath -p destinationPath

Note: Do *not* edit/delete the XML files on the path with backed up images.
There are libvirt XML configuration files for the guests and also one file
containing information about the original guest image sizes including the
selinux context to be restored (may be null if selinux is not used at all and
labelling was not done yet) and domain name the image belongs to.

Comment 4 Cole Robinson 2012-05-04 13:06:13 UTC
The proper way to get these tools into fedora is to package them and submit a package review. See https://fedoraproject.org/wiki/PackageMaintainers/Join

Either way, the KVM package was merged with the qemu package, so any future issues should be filed against the 'qemu' component.