Bookmark this page

Chapter 12. Managing Red Hat Virtualization Infrastructure

Abstract

Goal Back up, restore, and upgrade the software in a Red Hat Virtualization environment.
Objectives
  • Backup and restore a Red Hat Virtualization Manager (RHV-M) server.

  • Perform upgrades and minor updates to Red Hat Virtualization Manager and Red Hat Virtualization Hosts.

Sections
  • Backing Up and Restoring Red Hat Virtualization Manager (and Guided Exercise)

  • Updating and Upgrading Red Hat Virtualization (and Guided Exercise)

Lab

Managing Red Hat Virtualization Infrastructure

Backing Up and Restoring Red Hat Virtualization Manager

Objectives

After completing this section, you should be able to backup and restore a Red Hat Virtualization Manager (RHV-M) server.

Backing Up Red Hat Virtualization Manager

It is important to maintain complete backups of the machine running Red Hat Virtualization Manager, especially when making changes to the configuration of that machine. As part of a backup strategy, the engine-backup utility can be used to back up the RHV-M database and configuration files into a single archive file that can be easily stored.

Warning

The engine-backup command only backs up key configuration files, the engine database, and the Data Warehouse database of your RHV-M installation. It does not back up the operating system or installed software. The restore process requires that the RHV-M server has been reinstalled with an operating system and the RHV-M software packages, but that engine-setup has not yet been run.

In addition, engine-backup does not backup virtual machines. There are several possible approaches to backing up virtual machines, including using the Backup and Restore API discussed in the Red Hat Virtualization Administration Guide.

The engine-backup command will either perform a backup or restore your backup from archive. Further detailing is available with extended parameters.

Consider the following when adding options:

--mode=mode

Specifies the operating mode of the command. Two modes are available: backup, which creates a backup, and restore, which restores a backup. This option is required.

--file=backup-file

Specifies the location of the archive file containing the backup. This option is required.

--log=log-file

Specifies the location of a file used to record log messages from the backup or restore operation. This option is required.

--scope=scope

Specifies the scope of the backup or restore operation. There are four scopes:

  • all - backup or restore the engine database, Data Warehouse, and RHV-M configuration files (this is the default option).

  • db - backup or restore only the engine database.

  • files - backup or restore only RHV-M configuration files.

  • dwhdb - backup or restore only the Data Warehouse database.

This course uses a standard RHV-M installation running the engine, engine database, and Data Warehouse on the same server. In this case, --scope=all may be the easiest way to create backups. The other scopes are most useful for backing up more complex or advanced RHV-M configurations. Note that you can run engine-backup while RHV-M is running.

When using engine-backup to restore the database from a backup, there are options that may needed:

--provision-db

Creates a PostgreSQL database for the RHV-M engine on the server being restored. Used when restoring to a fresh installation that has not been setup.

--provision-dwh-db

Creates a database for the Data Warehouse on the server being restored. Used when restoring to a fresh installation that has not been setup.

--restore-permissions

Restores database permissions stored in the backup. Used when restoring to a fresh installation, or when overwriting an installation that was previously set up.

By using the engine-backup with --mode=backup option, you will create a .tgz (TAR Archive file). The file can be created in a directory using the --file option.

The tar file contains a backup of RHV-M configuration files, the engine database, and the Data Warehouse database. This backup archive should be copied from the RHV-M server to secure storage for later use.

Restoring Red Hat Virtualization Manager

While the process for restoring a backup using the engine-backup command is straightforward, there are several additional steps when compared to the process for creating a backup. The steps required depend on the destination to which the backup will be restored. For example, the engine-backup command can be used to restore backups to fresh installations of Red Hat Virtualization, on top of existing installations of Red Hat Virtualization, and using local or remote databases.

Warning

Backups can only be restored to environments of the same major release as the backup. For example, a backup of a Red Hat Virtualization version 4.1 environment can only be restored to another Red Hat Virtualization version 4.1 environment. To view the version of Red Hat Virtualization contained in a backup file, administrators can unpack the backup file and read the value in the version file, located in the root directory of the unpacked files.

The engine-backup command can be used to restore a backup to a fresh installation of the Red Hat Virtualization Manager. The following procedure must be performed on a machine with the base operating system and required packages for the Red Hat Virtualization Manager have been installed, but the engine-setup command has not yet been run. This procedure assumes that the backup file can be accessed from the machine on which the backup is to be restored.

Consider the following steps in order to restore a backup:

  1. Log in to the machine on which the Red Hat Enterprise Virtualization Manager is installed.

  2. Restore the full backup using the engine-backup command. Since the machine has not been set up, use the --provision-db option to provision the engine database, the --provision-dwh-db option to provision the Data Warehouse database, and the --restore-permissions option to restore the permissions for the databases.

    [root@demo ~]# engine-backup --mode=restore --file=backup-file.tgz \
    --log=log-file --provision-db --provision-dwh-db --restore-permissions

    If successful, the following output displays:

    You should now run engine-setup.
    Done.
    
  3. Run the command and follow the prompts to configure the engine:

    [root@demo ~]# engine-setup
  4. The engine database and configuration files for the Red Hat Virtualization Manager have been restored to the version in the backup.

Overwriting a RHV-M Installation

If you have made environment changes to the RHV-M installation since the last backup, you can discard those changes by running an engine-cleanup command. The engine-cleanup prompts for removal of components, stopping the engine service, and removing all installed ovirt data. If you do not want to remove the data, then engine-cleanup will abort.

After cleaning the RHV-M setup from the host server, you can then run the engine-backup command to restore a full backup, or a database only backup. The tables and credentials are already created, so you do not need to create new ones.

You can omit specific databases by leaving out the --scope="database" option when running the engine-backup command. After restoring the database, you must run the engine-setup command again to reconfigure the RHV-M.

References

Further information is available in the "Backups and Migration" chapter of the Administration Guide for Red Hat Virtualization at https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/administration_guide/index#chap-Backups_and_Migration

Revision: rh318-4.3-c05018e