5 1 0:KVM QEMU Backup

From SEPsesam
Other languages:


Docs latest icon.png Welcome to the latest SEP sesam documentation version 5.1.0 Apollon. For previous documentation version(s), check documentation archive.


Virtualization Are you looking for an alternative for your VMware environment?

SEP supports a range of hypervisors, offering snapshot-based online backup of VMs.

Click HERE to get an overview of the available SEP modules and explore supported features like CBT, Single File Restore, and more.

Overview


SEP sesam provides efficient data protection for libvirt-based KVM virtualization by integrating into the libvirt layer of the virtualization system. KVM/QEMU integration allows you to back up KVM/QEMU virtual machines on the single host systems.

Key features

Backup

  • The following backup methods are available for backing up VMs on the KVM host:
    • When using the config_only option, only the VM configuration is backed up.
    • Backup of individual VMs that can be grouped together in a task group.By adding your tasks for individual VMs to a task group, you can trigger all tasks at once with a single event. For details, see Adding a Task to the Task Group.
    • Backup of VMs with specific disks (disk exclusion).
  • The only supported KVM backup level is COPY backup. It is recommended to use SEP Si3 target deduplication for your KVM backups to reduce the size of the backed up data.
  • You can simplify backup of multiple VMs by automatically creating tasks for VMs that are connected to the same host; you can also automatically create clients for VMs to which the created tasks and ACLs can be assigned. It is recommended to use these features when a new hypervisor is added and many new VMs need to be backed up. For details, see Automating Backup Process.

Restore

  • You can restore your VMs via GUI restore or via the web interface Restore Assistant. Restore options:
    • Restore of complete VM and its configuration.
    • Restore of VM configuration.
    • Restore into new VM instances.
  • SEP sesam also provides a simple and flexible single file restore (SFR) for KVM if you have the appropriate permissions. For more details on SFR, see KVM Single file restore.

Limitations

  • 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. High-level applications, such as OVIRT, and other cloud-based solutions, such as OpenNebula or Cloudstack, are not supported.
  • The virtual machine you want to back up must not have any defined internal or external snapshots.
  • When backing up via hypervisor and using an 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 during the backup, so the backup saveset does not contain data for the external disk while the backup is successful and no warning about the missing data is issued. If a restore of a VM with external disk is performed to the original VM with the overwrite option, the disk is re-created and all existing data on the restore target is lost.
    To back up these hypervisors, you have to add one or more SCSI controllers to the virtual machine before performing a backup, even if there are no devices to use 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.

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. SEP sesam Client already contains all needed components for backing up the KVM/QEMU virtual machines.

Adding the KVM/QEMU client to the SEP sesam environment

Once you have downloaded the SEP sesam package, configure the KVM/QEMU host as a new client by adding it to the SEP sesam environment.

  1. From Main Selection -> Components -> Clients, select the relevant location and click the New Client button. The New Client window opens.
  2. From the Platform drop-down list, select Linux. When you select the platform, the Linux operating system is automatically set.
  3. Select the Virtualization server check box and then select KVM Server from the Virtualization server type drop-down list.
  4. KVM client.jpg
    For more details on the available options, see Configuring Clients.
  5. Click OK to add the new client.
SEP Tip.png Tip
If you prefer to watch a video instead of reading a step-by-step guide, you can learn all the steps of the backup procedure by watching Backup of KVM with SEP sesam on the SEP sesam YouTube channel.

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
  • Before proceeding, you should validate that you can back up 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.
    • Make sure you understand the limitations of KVM backups before configuring your backup task to ensure a successful restore. For example, backing up data stored on an RDM disk or on a VM without a SCSI controller is not supported and will be skipped without warning. Some special requirements apply to such cases. For more information, see the section Limitations.
  • If you want to back up a VM with direct-attached storage, additional steps are required. See the sectionConfiguring backup of VM with direct-attached storage or DRBD.
  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 (large 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!), specify OS credentials, 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 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. You can also group your backup tasks to task groups. For details, see Adding a Task to the Task Group.
  7. After you configure a schedule, you must create a new backup event for it. Go to Main Selection -> Scheduling -> New Backup Event, click the Parameter tab and select the appropriate backup level from the Backup level drop-down list. Note that only COPY backups of KVM virtual machines are supported. For details, see Creating a Backup Event.
  8. KVM bck event.jpg

Configuring backup of the VM configuration

If you want to back up only the VM configuration, go to the Options tab when you create a backup task in the GUI, or double-click the existing backup task to open its properties, and under the Options tab, in the Backup Options field, type the following command:

-a config_only

KVM bck-config only.jpg

Configuring backup of VM with direct-attached storage or DRBD

By default, the SEP sesam KVM/QEMU module only supports VMs with standard 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 unused blocks.
  1. To create a snapshot of a VM's direct-attached storage device (ISCSI LUN, DRBD device), the snapshot data must be stored on the hypervisor disk during the backup. An internal snapshot alone is not sufficient for a successful backup of the VMs' disks.
  2. To have the external snapshot of the direct-attached storage stored in the specified directory, e.g. /tmp/, double-click the backup task in the GUI to open its properties, and under the Options tab in the Backup options field, enter the following command:
  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

Monitoring backups

You can view the status of your backup jobs in the GUI (Monitoring -> Last Backup State or Job State -> Backups) or SEP sesam Web UI (select Monitoring from the side menu) The backup status overview provides detailed information about 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.

Known issues

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


See also

Standard Backup ProcedureAutomating Backup ProcessKVM/QEMU RestoreKVM QEMU Single File Restore

Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.