4 4 3 Tigon:KVM QEMU Backup

From SEPsesam
Revision as of 15:18, 8 April 2019 by Sta (talk | contribs) (Fixed link for SEP download center.)
Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Template:Copyright SEP AG en
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3 Tigon/4.4.3 Grolar. For previous documentation version(s), check documentation archive.


Overview

SEP sesam provides efficient data protection for libvirt-based KVM virtualization by integrating into the libvirt layer of the virtualization system. Introduced in SEP sesam v. 4.4.3 Tigon, KVM/QEMU integration allows you to back up KVM/QEMU virtual machines on the single host systems. Supported backup levels are FULL and COPY.

Example configurations are single virtualization hosts running Debian, CentOS or SLES-based distributions in single instance set-ups that are used to virtualize systems using QEMU and libvirt. Note that high-level applications, such as OVIRT, and other cloud-based solutions, such as OpenNebula or Cloudstack, are not supported.

SEP sesam KVM/QEMU integration advantages

  • Online backup of running VMs using snapshot technology.
  • Online backup of VM configuration.
  • Restore of complete VMs and their configuration.
  • Restore of VM configuration.
  • Restore into new VM instances.

Requirements

To ensure error-free operation of SEP sesam and improve performance, make sure that the following conditions are met:

  • Check the support matrix for the list of supported KVM/QEMU versions.
  • Download the SEP sesam Client package according to your distribution. As of SEP sesam v. 4.4.3 Tigon, SEP sesam Client already contains all needed components for backing up the KVM/QEMU virtual machines.

Adding the KVM/QEMU client to SEP sesam environment

Once you have downloaded the SEP sesam package, configure KVM/QEMU as new client by adding it to the SEP sesam environment: Main selection -> Components -> Topology -> New client -> add your KVM/QEMU server. For details, see Configuring Clients.

Information sign.png Note
Before proceeding, you should validate that you can backup to SEP sesam. Run a test Path backup manually to ensure that the backups work. For details on typical backup configuration, see Standard Backup Procedure.

Configuring KVM/QEMU backup

Configuring a KVM/QEMU backup on the SEP sesam Server involves creating a KVM/QEMU backup task, setting up a backup schedule (specifying when you want to back up your data) and linking the schedule to a backup event (specifying how and where to back up the data). For general details on backup configuration and prerequisites, see Standard Backup Procedure. However, configuring an KVM/QEMU backup differs slightly from the standard procedure and requires some KVM/QEMU-specific steps, which are described below.

Information sign.png Note
  • The virtual machine that you want to back up must not have any defined internal or external snapshots.
  • When backing up via hypervisor and using external disk, SEP sesam cannot back up the data on the RDM disks or on a VM without attached SCSI controller(s). The data of such disks is silently skipped from backup, hence the backup saveset contains no data for the external disk, while the backup succeeds and no warning about the missing data is issued. If a restore of a VM with external disk is performed to the original VM by using the option overwrite, the disk is re-created and all existing data on the restore target is lost.
    To back these hypervisors, you have to add one or more SCSI controller to the virtual machine before performing a backup, even if there are no devices to use the SCSI, or you have to install a SEP sesam Client in the virtual machine and perform an additional file or application backup to back up this data.
  1. From Main Selection -> Tasks -> By clients, select KVM/QEMU client and click New backup task. The New backup task window opens.
  2. Select the Source. Click the Browse button (big arrow) and select the KVM virtual machine that you want to back up from the list of virtual machines detected on the host system. By selecting the source, the task type and task name are set automatically.
  3. KVM bck task.jpg
  4. If you want to define other options (such as pre/post backup and restore commands, set encryption or compress data (do not use this option if you want to restore a single file!), consolidate individual tasks under a specific task group, or assign a task to the schedule), click the corresponding tabs in the New backup task window.
    Click OK to create the task.
  5. If you want to start the newly created task immediately, right-click the name of the task and click Immediate Start. If you want to create a periodic backup, you have to create a schedule for your backup task: Click New schedule under Main Selection -> Scheduling -> Schedules and set up a schedule. For more details, see Creating a Schedule.
  6. SEP Tip.png Tip
    You can also add your backup task to an existing schedule by double-clicking the backup task, selecting the tab Schedules and adding it to one or more schedules. Additionally, you can group your backup tasks to task groups. For details, see Adding a Task to the Task Group.
  7. Once you have configured a schedule, you must create a new backup event for it. For general information on creating a backup event, see Creating a backup event. Note that only FULL and COPY backups of KVM virtual machines are supported.

You can view the status of your backup jobs by selecting Last backup state in the Main Selection window. The backup status overview provides detailed information on the last run of backup jobs, including the task name, start and stop time of the last backup, backup level, data size, throughput, assigned media pool, etc.

Configuring backup of VM with direct-attached storage or DRBD

By default, SEP sesam KVM/QEMU module only supports VMs with default QCOW2 or RAW devices placed in the regular file system of the virtualization host. If you want to back up a VM with direct-attached storage, additional steps are required.

Information sign.png Note
With direct-attached storage or DRBD it is only possible to back up the whole LUN device with non-used blocks.
  1. To snapshot a device with direct-attached storage (ISCSI LUN, DRBD device) of a VM, the snapshot data must be put to the hypervisor disk during backup. Having only internal snapshot is not sufficient for the successful backup of the VMs disks.
  2. In the GUI, open the backup task properties, and under the Options tab in the Save options field enter the following command to enable placing the external snapshot of direct-attached storage into the specified directory, e.g., /tmp/:
  3. -a snapshotdir=/path/ By adding this option, SEP sesam KVM/QEMU will place the external snapshot of direct-attached storage into this directory.
    KVM snapshot option.jpg

Known issues

If you have problems, check the KVM/QEMU Troubleshooting.

See also

KVM QEMU RestoreStandard Backup Procedure