10.1.3 Restoring Oracle VM Manager

To restore Oracle VM Manager, and the Oracle VM Manager database schema from a backup, do the following:

  1. First, if you need to reinstall or upgrade Oracle VM Manager, use the Oracle VM Manager installation media to perform an install or upgrade of the software on your server. See Installing Oracle VM Manager for information on how to perform the installation. See Upgrading Oracle VM Manager for information on how to perform the upgrade.

    You should perform the install using the runInstaller.sh --uuid uuid command and provide the UUID from the previous manager installation you created a backup from. The UUID can be found in the Oracle VM Manager configuration file.

    Note

    The Oracle VM Manager UUID is also persisted in the /etc/sysconfig/ovmm file on Linux, and in the /etc/opt/ovmm file on Solaris. If the system disk of the server on which you are installing or restoring Oracle VM Manager was not wiped entirely, the existing UUID is still present and will be detected when running the installer.

    • The --uuid option on Linux overrides this existing UUID. Solaris users must use the shortened form of this option: -u.

    • If no UUID is present in /etc/sysconfig/ovmm, the --uuid option adds the UUID to the file on Linux. On Solaris, the -u option adds the UUID to /etc/opt/ovmm if the UUID is not present in this file.

    An example install command syntax for Linux is as shown in this example:

    # ./runInstaller.sh --uuid 0004FB000000100002CB7F2DFFA8D8

    When the Oracle VM Manager installer prompts for installation information, reuse the same usernames for the database schema, Oracle WebLogic Server and Oracle VM Manager administration user, as set out in the backup of the Oracle VM Manager configuration file.

    If possible, you should reuse the same passwords that existed for Oracle VM Manager prior to reinstallation, to avoid problems restarting the Oracle VM Manager service after Oracle VM Manager has been restored from backup. If you intend to change these passwords, do so after you have completed the restore operation.

    Should you use a new password during reinstallation, you are unable to start the Oracle VM Manager service after the database has been restored. To rectify this situation, you must manually reset the passwords for the ovs and appfw users in the MySQL database. This can be achieved using the mysqladmin tool.

  2. After installation, reinstallation or upgrade, stop the Oracle VM Manager Command Line Interface, Oracle VM Manager, and the database before you restore the backup. On Linux:

    # /sbin/service ovmcli stop
    # /sbin/service ovmm stop
    # /sbin/service ovmm_mysql stop 
  3. To initiate the database restore, as the oracle user, use the RestoreDatabase command located in /u01/app/oracle/ovm-manager-3/ovm_tools/bin, for example:

    # su - oracle
    $ bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh \
         ManualBackup-time_stamp_ID

    The RestoreDatabase script expects the name of the directory for a particular backup directory as described in Section 10.1.2.1, “Contents of the Backup Directory”. You do not need to specify the full path to the backup directory as this is already specified in the DBBACKUP variable.

    The RestoreDatabase script prompts you to remove existing database directories and their contents so that the database restore operation can complete successfully. You must confirm that it is safe to delete this data before the script can proceed. If you opt not to delete this data, the script cannot continue until the data has been removed. It is recommended that you allow the script to perform this action rather than attempting to do this manually:

    Before the database can be restored, 
      the following database directories/files must be deleted:
    appfw ibdata1 ib_logfile0 ib_logfile1 mysql ovs performance_schema
    
    Are you sure it is safe to delete these directories/files now? [y,n] y
    Deleting directory /u01/app/oracle/mysql/data/appfw
    Deleting directory /u01/app/oracle/mysql/data/ibdata1
    Deleting directory /u01/app/oracle/mysql/data/ib_logfile0
    Deleting directory /u01/app/oracle/mysql/data/ib_logfile1
    Deleting directory /u01/app/oracle/mysql/data/mysql
    Deleting directory /u01/app/oracle/mysql/data/ovs
    Deleting directory /u01/app/oracle/mysql/data/performance_schema
    INFO: Expanding the backup image...
    INFO: Applying logs to the backup snapshot...
    INFO: Restoring the backup...
    INFO: Restoring OVM keystores and certificates
    INFO: Success - Done!
    INFO: Log of operations performed is available at:
     /u01/app/oracle/mysql/dbbackup/ManualBackup-time_stamp_ID/Restore.log
    
    
    IMPORTANT:
    
          As 'root', please start the OVM Manager database and application using:
                service ovmm_mysql start; service ovmm start; service ovmcli start
            
    Important

    The RestoreDatabase script performs a version check to ensure that the database version matches the version of the database from which the backup was created. If there is a version mismatch, the script exits with a warning, as this action may render Oracle VM Manager unusable. It is possible to override this version check by using the --skipversionchecks option when invoking the script. This option should be used with care as version mismatches may have undesirable consequences for Oracle VM Manager.

  4. Restart the database and Oracle VM Manager, and the Oracle VM Manager Command Line Interface. On Linux:

    # /sbin/service ovmm_mysql start
    # /sbin/service ovmm start 
    # /sbin/service ovmcli start 
  5. Because the certificates required to authenticate various components, such as the Oracle VM Manager Web Interface and Oracle VM Manager Command Line Interface, are regenerated during the new installation and the mappings for these are overwritten by the database restore, it is necessary to reconfigure the certificates used to authenticate these components.

    Run the following script to reconfigure the Oracle WebLogic Server:

    # export MW_HOME=/u01/app/oracle/Middleware
    # /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh setupWebLogic

    For more information on the ovmkeytool.sh script, see Section 2.2.1, “Oracle VM Key Tool”.

  6. If you moved Oracle VM Manager to a new host, you must generate a new SSL key as follows:

    # /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovmkeytool.sh gensslkey

    For more information on generating a new SSL key, see Section 2.2.5, “Generating a New SSL Key”.

  7. Restart Oracle VM Manager and then run the client certificate configuration script, as follows:

    # /sbin/service ovmm restart
    # /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh /path/to/cacert

    Where /path/to/cacert is the absolute path to the CA certificate. You must provide the path to the CA certificate if you used a CA other than the default Oracle VM Manager CA to sign the SSL certificate.

    The script requires that Oracle VM Manager is running, and prompts you for the administrator username and password that should be used to access Oracle VM Manager. The script makes changes that may require Oracle VM Manager to be restarted:

    # /sbin/service ovmm restart
  8. Within Oracle VM Manager go to the Servers and VMs tab and perform a Refresh All on your existing server pools. Refer to the Oracle VM Manager Online Help for more information on these options.