Restore OVM 3.x Manager with MySQL database

Mount OVM Manager CD
Run the runInstaller.sh -u {UID of OLD Manager}

Restoring the MySQL Database for Oracle VM Manager

To restore the database to one of the available backups, the manager and the database need to shutdown, for example as the root user execute the following commands:

# service ovmm stop; service ovmm_mysql stop
To initiate the restore, as the oracle user, use the RestoreDatabase.sh command located in the /u01/app/oracle/ovm-manager-3/ovm_shell/tools, for example:

# su – oracle
$ bash /u01/app/oracle/ovm-manager-3/ovm_shell/tools/RestoreDatabase.sh
AutoFullBackup-10222012_162543
INFO: Expanding the backup image…
INFO: Applying logs to the backup snapshot…
INFO: Restoring the backup…
INFO: Success – Done!
INFO: Log of operations performed is available at:
/u01/app/oracle/mysql/dbbackup/AutoFullBackup-10172012_122920/Restore.log

IMPORTANT:

As ‘root’, please start the OVM Manager database and application using:
service ovmm_mysql start; service ovmm start

The RestoreDatabase.sh script expects the name of the directory for a particular backup directory. You do not need to specify the full path to the backup directory as this is already specified in the DBBACKUP variable.

Once you have restored the database, restart the database and manager as the root user:

# service ovmm_mysql start; service ovmm start

IMPORTANT:

Make sure your time is correct! I spent 2 hours troubleshooting login issues to new environment and it was the [email protected]@[email protected]!!!!!

 

Fixing OVM 3.1.1 Database

I found myself in a situation where I had “ghost” repository servers in presented to my nfs repository. This stopped my from being able to import anything into the repository. Not good. So I found this quick fix….

 

Ran as follows:
/etc/init.d/ovmm stop

NOTE: cat /u01/app/oracle/ovm-manager-3/.config (This provides some of the info you need to connect to your db if you have forgotten.)

cd /u01/app/oracle/ovm-manager-3/bin/
./ovm_upgrade.sh –fixup –dbhost=localhost –dbport=1521 –dbsid=OVM –dbuser=ovs –dbpass=password

This ran fixed errors.

Restarted OVM Manager:
/etc/init.d/ovmm start