En principio, según el funcionamiento del VM Manager 3.1.1 no tendría porqué ser necesario restaurar el esquema en una instalación desde 0 ya que al arrancar por primera vez y hacer un «rediscover» de todos los servidores debería restaurar automáticamente las configuraciones. No obstante, no está de más conocer el proceso.
Bien, dicho esto comenzamos la restauración. Debemos parar lo primero el VM Manager:
[root@oraclevmm ~]# /etc/init.d/ovmm stop Stopping Oracle VM Manager [ OK ]
Al igual que al generar el backup, cambiamos de root al usuario oracle y asignamos las variables de entorno correspondientes:
[root@oraclevmm ~]# su - oracle [oracle@oraclevmm ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 [oracle@oraclevmm ~]$ export PATH=$ORACLE_HOME/bin:$PATH [oracle@oraclevmm ~]$ export ORACLE_SID=ovm
Después accedemos al sqlplus de Oracle y recreamos el usuario ovs:
[oracle@oraclevmm ~]$ sqlplus system/password SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 21 09:27:40 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production SQL> drop user ovs cascade; User dropped. SQL> create user ovs identified by password; User created. SQL> grant connect, resource to ovs; Grant succeeded. SQL> exit; Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Y finalmente restauramos el dump del esquema ovs que generamos al hacer el backup:
[oracle@oracle-linux ~]$ imp ovs/password file=/home/oracle/ovsbackup.dmp full=y Import: Release 11.2.0.1.0 - Production on Fri Sep 21 09:31:15 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production Export file created by EXPORT:V11.02.00 via conventional path import done in US7ASCII character set and AL16UTF16 NCHAR character set import server uses AL32UTF8 character set (possible charset conversion) . importing OVS's objects into OVS . . importing table "MGR_ABCSTORE" 48 rows imported . . importing table "MGR_ACCESSMANAGER" 1 rows imported . . importing table "MGR_ACTIONENGINEPROPERTIES" 1 rows imported . . importing table "MGR_ACTIONMANAGER" 1 rows imported . . importing table "MGR_ARCHIVEDONEEVENT" 6 rows imported . . importing table "MGR_ARCHIVEMANAGER" 1 rows imported . . importing table "MGR_ARCHIVESTARTINGEVENT" 6 rows imported . . importing table "MGR_BACKUPMANAGER" 1 rows imported . . importing table "MGR_BALANCERCONTROL" 1 rows imported . . importing table "MGR_BONDPORT" 4 rows imported . . importing table "MGR_BUSINESSMANAGER" 1 rows imported . . importing table "MGR_CLUSTER" 1 rows imported . . importing table "MGR_COHERENCE" 1 rows imported . . importing table "MGR_CONTROLDOMAIN" 2 rows imported . . importing table "MGR_CPUCOMPATIBILITYGROUP" 1 rows imported . . importing table "MGR_CREATEDEVENT" 389 rows imported . . importing table "MGR_CREATESTATISTICLOG" 0 rows imported . . importing table "MGR_DELETEDEVENT" 28 rows imported . . importing table "MGR_DISCOVERENGINEPROPERTIES" 1 rows imported . . importing table "MGR_DISCOVERMANAGER" 1 rows imported . . importing table "MGR_ETHERNETNETWORK" 8 rows imported . . importing table "MGR_ETHERNETPORT" 16 rows imported . . importing table "MGR_EVENTENGINEPROPERTIES" 1 rows imported . . importing table "MGR_EVENTLOG" 447 rows imported . . importing table "MGR_EVENTMANAGER" 1 rows imported . . importing table "MGR_FIBRECHANNELSTORAGEARRAY" 1 rows imported . . importing table "MGR_FILEMANAGER" 1 rows imported . . importing table "MGR_FILESYSTEMMOUNT" 2 rows imported . . importing table "MGR_FILESYSTEMPLUGIN" 2 rows imported . . importing table "MGR_FOUNDRY" 1 rows imported . . importing table "MGR_HASHMAP" 3 rows imported . . importing table "MGR_INFORMATIONALEVENT" 2 rows imported . . importing table "MGR_INTERNALJOB" 195 rows imported . . importing table "MGR_INTERNALPORT" 2 rows imported . . importing table "MGR_INTERNALSYSTEMLOG" 2 rows imported . . importing table "MGR_ISCSISTORAGEARRAY" 1 rows imported . . importing table "MGR_ISCSISTORAGEINITIATOR" 2 rows imported . . importing table "MGR_ISCSISTORAGEPATH" 26 rows imported . . importing table "MGR_ISCSISTORAGETARGET" 13 rows imported . . importing table "MGR_ITERATOR" 10 rows imported . . importing table "MGR_JOBABORTEVENT" 5 rows imported . . importing table "MGR_JOBCONSTRUCTINGEVENT" 206 rows imported . . importing table "MGR_JOBDONEEVENT" 150 rows imported . . importing table "MGR_JOBFAILUREEVENT" 40 rows imported . . importing table "MGR_JOBROLLBACKDONEEVENT" 40 rows imported . . importing table "MGR_JOBROLLBACKEVENT" 40 rows imported . . importing table "MGR_JOBRUNNINGEVENT" 191 rows imported . . importing table "MGR_LINKEDLIST" 392 rows imported . . importing table "MGR_LOCALFILESERVER" 2 rows imported . . importing table "MGR_LOCALFILESYSTEM" 1 rows imported . . importing table "MGR_LOCALSTORAGEARRAY" 2 rows imported . . importing table "MGR_LOCALSTORAGEINITIATOR" 2 rows imported . . importing table "MGR_LOGENGINEPROPERTIES" 1 rows imported . . importing table "MGR_LOGMANAGER" 1 rows imported . . importing table "MGR_LOGSTORE" 2 rows imported . . importing table "MGR_MODELENGINEPROPERTIES" 1 rows imported . . importing table "MGR_MODELMANAGER" 1 rows imported . . importing table "MGR_NETWORKSELECTIONMANAGER" 1 rows imported . . importing table "MGR_OBJECTCHANGEEVENT" 100 rows imported . . importing table "MGR_PATHDOWNEVENT" 26 rows imported . . importing table "MGR_PATHUPEVENT" 26 rows imported . . importing table "MGR_POOLFILESYSTEM" 1 rows imported . . importing table "MGR_PORTDOWNEVENT" 73 rows imported . . importing table "MGR_PORTUPEVENT" 66 rows imported . . importing table "MGR_PROCESSOR" 48 rows imported . . importing table "MGR_PROPERTIES" 18 rows imported . . importing table "MGR_QUEUEDJOBCREATEEVENT" 1 rows imported . . importing table "MGR_RASENGINEPROPERTIES" 1 rows imported . . importing table "MGR_RASMANAGER" 1 rows imported . . importing table "MGR_REPOSITORY" 1 rows imported . . importing table "MGR_RESTOREMANAGER" 1 rows imported . . importing table "MGR_ROLESERVICE" 1 rows imported . . importing table "MGR_ROOTSTATISTICLOG" 1 rows imported . . importing table "MGR_RULESENGINEPROPERTIES" 1 rows imported . . importing table "MGR_RULESMANAGER" 1 rows imported . . importing table "MGR_SCHEDULABLETASKPROPERTIES" 8 rows imported . . importing table "MGR_SERVER" 2 rows imported . . importing table "MGR_SERVERCLUSTERSTATEDOWNEVEN" 19 rows imported . . importing table "MGR_SERVERCLUSTERSTATEUPEVENT" 15 rows imported . . importing table "MGR_SERVERDISCONNECTERROREVENT" 32 rows imported . . importing table "MGR_SERVERDISCOVERSCANEVENT" 162 rows imported . . importing table "MGR_SERVERERROREVENT" 3 rows imported . . importing table "MGR_SERVERNOTIFICATION" 26 rows imported . . importing table "MGR_SERVEROFFLINEEVENT" 25 rows imported . . importing table "MGR_SERVERPOOL" 1 rows imported . . importing table "MGR_SERVERPOOLMASTERMISSINGEVE" 5 rows imported . . importing table "MGR_SERVERRUNNINGEVENT" 49 rows imported . . importing table "MGR_SERVERSELECTIONMANAGER" 1 rows imported . . importing table "MGR_SERVERSTARTINGEVENT" 25 rows imported . . importing table "MGR_SERVERSTOPPEDEVENT" 51 rows imported . . importing table "MGR_SERVERSTOPPINGEVENT" 1 rows imported . . importing table "MGR_SERVERYUMREPOSITORYINFORMA" 1 rows imported . . importing table "MGR_SEVERITYCHANGEEVENT" 9 rows imported . . importing table "MGR_STATISTICMANAGER" 1 rows imported . . importing table "MGR_STATISTICSUBJECTLOG" 3 rows imported . . importing table "MGR_STATISTICTYPELOG" 41 rows imported . . importing table "MGR_STORAGEARRAYPLUGIN" 1 rows imported . . importing table "MGR_STORAGEELEMENT" 13 rows imported . . importing table "MGR_STORAGESELECTIONMANAGER" 1 rows imported . . importing table "MGR_TASKENGINEPROPERTIES" 1 rows imported . . importing table "MGR_TASKMANAGER" 1 rows imported . . importing table "MGR_TREEMAP" 195 rows imported . . importing table "MGR_TREESTORE" 1077 rows imported . . importing table "MGR_USER" 4 rows imported . . importing table "MGR_USERACCOUNT" 4 rows imported . . importing table "MGR_USERSTORE" 1 rows imported . . importing table "MGR_VIRTUALCDROM" 3 rows imported . . importing table "MGR_VIRTUALDISK" 1 rows imported . . importing table "MGR_VIRTUALMACHINE" 1 rows imported . . importing table "MGR_VIRTUALMACHINECFGFILE" 1 rows imported . . importing table "MGR_VIRTUALMACHINEDISCONNECTER" 7 rows imported . . importing table "MGR_VIRTUALMACHINEOFFLINEEVENT" 5 rows imported . . importing table "MGR_VIRTUALMACHINERUNNINGEVENT" 15 rows imported . . importing table "MGR_VIRTUALMACHINESTARTINGEVEN" 12 rows imported . . importing table "MGR_VIRTUALMACHINESTOPPEDEVENT" 16 rows imported . . importing table "MGR_VIRTUALMACHINESTOPPINGEVEN" 6 rows imported . . importing table "MGR_VMDISKMAPPING" 2 rows imported . . importing table "MGR_VMSELECTIONMANAGER" 1 rows imported . . importing table "MGR_VNIC" 5 rows imported . . importing table "MGR_VNICMANAGER" 1 rows imported . . importing table "MGR_VNICMANAGERPROPERTIES" 1 rows imported . . importing table "MGR_VOLUMEGROUP" 4 rows imported . . importing table "MGR_XENHYPERVISOR" 2 rows imported . . importing table "ODOF_ID_TO_TYPE" 4537 rows imported . . importing table "ODOF_NOT_TABLED" 0 rows imported . . importing table "ODOF_SYS_PROPERTIES" 2 rows imported . . importing table "ODOF_TYPE_TO_CLASS" 123 rows imported Import terminated successfully without warnings.
Ya sólo queda iniciar de nuevo Oracle VM Manager y verificar que todo es correcto:
[oracle@oraclevmm ~]$ logout [root@oraclevmm ~]# /etc/init.d/ovmm start Starting Oracle VM Manager [ OK ]