This utility named KVMbackup is used to perform automatic backup of virtual machines with QEMU/KVM. It will check that virtual machine is running alright and than make its backup to a given storage space.

KVMbackup

Requirements

  • 64 bit Linux (tested on CentOS 7 and Ubuntu 19)
  • qemu-kvm version 2.10 or higher
  • virtual machine with guest agent installed
  • virtual machine without snapshots

MIT License

This is open source license with a minimal combination of discreet legal tools. Software under this license can be used and copiedd with conditions only requiring preservation of the copyright and license terms.

Copyright © 2019 Lukáš Gallina

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download

You can download KVMbackup version 1.1.0 build 979 for free. However your donations will be deeply appreciated.

Instructions

Run KVMbackup with proper permissions. For example, use the cron software utility.

./KVMbackup --config-file=<full_path_for_virtual_machine_settings_file>

“Virtual settings file” structure

[KVMbackup]
ErrorMailRecipient=<email_for_error_report>mail address for send error report; remove means not send error report
[Machine]
DomainName=<name>domain name (name of virtual machine)
[Backups]
Numbers=<retain_backups>

Compress=<type_for_backup_storage>
number of backups kept outside the current one

TAR for only tar; ZIP for only zip; TARGZIP for gzip compress and tar; TARLZOP (default) for lzop compress and tar
[Paths]
KVMachinesPath=<paths_for_virtuals_xml>

BackupPath=<path_for_store_backup>

BackupPathMountCheck=<mountpoint_of_backup_path>
path for QEMU’s virtual machines definition files (/etc/libvirt/qemu)

destination for stored backup (it will create a folder with the virtual machine name)

mountpoint for check mounted backup path
[Volumes]
Disk1=<backuped_virtual_machine_disk>

Disk2=<backuped_virtual_machine_disk>



Disk100=<backuped_virtual_machine_disk>
name of virtual machine disk, whitch want backup

name of virtual machine disk, whitch want backup



name of virtual machine disk, whitch want backup

Example of “virtual settings file” structure

[KVMbackup]
ErrorMailRecipient=support@mydomain.com
[Machine]
DomainName=WINDOWS10
[Backups]
Numbers=3
Compress=TARLZOP
[Paths]
KVMachinesPath=/etc/libvirt/qemu
BackupPath=/mnt/backup/microsoft
BackupPathMountCheck=/mnt/backup
[Volumes]
Disk1=Windows10_diskC.raw
Disk2=Windows10_diskD.raw

Lukáš Gallina If you like my work, I will be gratuful for your donation. Make it as high as you possibly can.