Vamos a ver los pasos necesarios para hacer una copia de seguridad de la información relevante que tiene Oracle VM Manager 3.1.1. En este caso se trata de realizar un backup del contenido del esquema de la base de datos Oracle (tanto en instalación de producción como demo) y del fichero de configuración de OVMM que contiene los datos de acceso a la BD (SID, DBHOST,OVSCHEMA…), el UUID, etc.
Hacemos entonces en primera instancia una copia del fichero de configuración (/u01/app/oracle/ovm-manager-3/.config), lo podéis guardar en cualquier sitio, lo importante es disponer de estos datos si fuera necesaria una reinstalación del Manager:
[root@oraclevmm]# cat /u01/app/oracle/ovm-manager-3/.config DBHOST=oraclevmm SID=ovm LSNR=1521 APEX=None OVSSCHEMA=ovs WLSADMIN=weblogic OVSADMIN=admin COREPORT=54321 UUID=0003Va00000100000332c8d9sbafdf12g BUILDID=3.1.1.305
Una vez guardado, tenemos que parar temporalmente Oracle VM Manager para poder tener una copia consistente de la base de datos:
[root@oraclevmm]# /etc/init.d/ovmm stop Stopping Oracle VM Manager [ OK ]
El siguiente paso es hacer su contra el usuario oracle:
[root@oraclevmm]# su - oracle [oracle@oraclevmm ~]$
Ahora preparamos las variables de oracle para ejecutar el dump de la base de datos. Básicamente tenemos que especificar el PATH al HOME de oracle (ORACLE_HOME), añadirlo al PATH y exportar el SID. Si habéis instalado la base de datos Oracle en otra ruta debéis adecuarlo:
[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
Finalmente exportamos el esquema con el siguiente comando, en el que hay que especificar el nombre del esquema y la password del usuario administrador del mismo (ovs/password). También indicamos la ruta en la que volcar el dump/backup y el nombre:
[oracle@oraclevmm ~]$ exp ovs/password grants=y compress=y file=/home/oracle/ovsbackup-2012-09-20.dmp Export: Release 11.2.0.1.0 - Production on Thu Sep 20 14:53:08 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 done in US7ASCII character set and AL16UTF16 NCHAR character set server uses AL32UTF8 character set (possible charset conversion) . exporting pre-schema procedural objects and actions . exporting foreign function library names for user OVS . exporting PUBLIC type synonyms . exporting private type synonyms . exporting object type definitions for user OVS About to export OVS's objects ... . exporting database links . exporting sequence numbers . exporting cluster definitions . about to export OVS's tables via Conventional Path ... . . exporting table MGR_ABCSTORE 48 rows exported . . exporting table MGR_ACCESSMANAGER 1 rows exported . . exporting table MGR_ACTIONENGINEPROPERTIES 1 rows exported . . exporting table MGR_ACTIONMANAGER 1 rows exported . . exporting table MGR_ARCHIVEDONEEVENT 6 rows exported . . exporting table MGR_ARCHIVEMANAGER 1 rows exported . . exporting table MGR_ARCHIVESTARTINGEVENT 6 rows exported . . exporting table MGR_BACKUPMANAGER 1 rows exported . . exporting table MGR_BALANCERCONTROL 1 rows exported . . exporting table MGR_BONDPORT 4 rows exported . . exporting table MGR_BUSINESSMANAGER 1 rows exported . . exporting table MGR_CLUSTER 1 rows exported . . exporting table MGR_COHERENCE 1 rows exported . . exporting table MGR_CONTROLDOMAIN 2 rows exported . . exporting table MGR_CPUCOMPATIBILITYGROUP 1 rows exported . . exporting table MGR_CREATEDEVENT 389 rows exported . . exporting table MGR_CREATESTATISTICLOG 0 rows exported . . exporting table MGR_DELETEDEVENT 28 rows exported . . exporting table MGR_DISCOVERENGINEPROPERTIES 1 rows exported . . exporting table MGR_DISCOVERMANAGER 1 rows exported . . exporting table MGR_ETHERNETNETWORK 8 rows exported . . exporting table MGR_ETHERNETPORT 16 rows exported . . exporting table MGR_EVENTENGINEPROPERTIES 1 rows exported . . exporting table MGR_EVENTLOG 447 rows exported . . exporting table MGR_EVENTMANAGER 1 rows exported . . exporting table MGR_FIBRECHANNELSTORAGEARRAY 1 rows exported . . exporting table MGR_FILEMANAGER 1 rows exported . . exporting table MGR_FILESYSTEMMOUNT 2 rows exported . . exporting table MGR_FILESYSTEMPLUGIN 2 rows exported . . exporting table MGR_FOUNDRY 1 rows exported . . exporting table MGR_HASHMAP 3 rows exported . . exporting table MGR_INFORMATIONALEVENT 2 rows exported . . exporting table MGR_INTERNALJOB 195 rows exported . . exporting table MGR_INTERNALPORT 2 rows exported . . exporting table MGR_INTERNALSYSTEMLOG 2 rows exported . . exporting table MGR_ISCSISTORAGEARRAY 1 rows exported . . exporting table MGR_ISCSISTORAGEINITIATOR 2 rows exported . . exporting table MGR_ISCSISTORAGEPATH 26 rows exported . . exporting table MGR_ISCSISTORAGETARGET 13 rows exported . . exporting table MGR_ITERATOR 10 rows exported . . exporting table MGR_JOBABORTEVENT 5 rows exported . . exporting table MGR_JOBCONSTRUCTINGEVENT 206 rows exported . . exporting table MGR_JOBDONEEVENT 150 rows exported . . exporting table MGR_JOBFAILUREEVENT 40 rows exported . . exporting table MGR_JOBROLLBACKDONEEVENT 40 rows exported . . exporting table MGR_JOBROLLBACKEVENT 40 rows exported . . exporting table MGR_JOBRUNNINGEVENT 191 rows exported . . exporting table MGR_LINKEDLIST 392 rows exported . . exporting table MGR_LOCALFILESERVER 2 rows exported . . exporting table MGR_LOCALFILESYSTEM 1 rows exported . . exporting table MGR_LOCALSTORAGEARRAY 2 rows exported . . exporting table MGR_LOCALSTORAGEINITIATOR 2 rows exported . . exporting table MGR_LOGENGINEPROPERTIES 1 rows exported . . exporting table MGR_LOGMANAGER 1 rows exported . . exporting table MGR_LOGSTORE 2 rows exported . . exporting table MGR_MODELENGINEPROPERTIES 1 rows exported . . exporting table MGR_MODELMANAGER 1 rows exported . . exporting table MGR_NETWORKSELECTIONMANAGER 1 rows exported . . exporting table MGR_OBJECTCHANGEEVENT 100 rows exported . . exporting table MGR_PATHDOWNEVENT 26 rows exported . . exporting table MGR_PATHUPEVENT 26 rows exported . . exporting table MGR_POOLFILESYSTEM 1 rows exported . . exporting table MGR_PORTDOWNEVENT 73 rows exported . . exporting table MGR_PORTUPEVENT 66 rows exported . . exporting table MGR_PROCESSOR 48 rows exported . . exporting table MGR_PROPERTIES 18 rows exported . . exporting table MGR_QUEUEDJOBCREATEEVENT 1 rows exported . . exporting table MGR_RASENGINEPROPERTIES 1 rows exported . . exporting table MGR_RASMANAGER 1 rows exported . . exporting table MGR_REPOSITORY 1 rows exported . . exporting table MGR_RESTOREMANAGER 1 rows exported . . exporting table MGR_ROLESERVICE 1 rows exported . . exporting table MGR_ROOTSTATISTICLOG 1 rows exported . . exporting table MGR_RULESENGINEPROPERTIES 1 rows exported . . exporting table MGR_RULESMANAGER 1 rows exported . . exporting table MGR_SCHEDULABLETASKPROPERTIES 8 rows exported . . exporting table MGR_SERVER 2 rows exported . . exporting table MGR_SERVERCLUSTERSTATEDOWNEVEN 19 rows exported . . exporting table MGR_SERVERCLUSTERSTATEUPEVENT 15 rows exported . . exporting table MGR_SERVERDISCONNECTERROREVENT 32 rows exported . . exporting table MGR_SERVERDISCOVERSCANEVENT 162 rows exported . . exporting table MGR_SERVERERROREVENT 3 rows exported . . exporting table MGR_SERVERNOTIFICATION 26 rows exported . . exporting table MGR_SERVEROFFLINEEVENT 25 rows exported . . exporting table MGR_SERVERPOOL 1 rows exported . . exporting table MGR_SERVERPOOLMASTERMISSINGEVE 5 rows exported . . exporting table MGR_SERVERRUNNINGEVENT 49 rows exported . . exporting table MGR_SERVERSELECTIONMANAGER 1 rows exported . . exporting table MGR_SERVERSTARTINGEVENT 25 rows exported . . exporting table MGR_SERVERSTOPPEDEVENT 51 rows exported . . exporting table MGR_SERVERSTOPPINGEVENT 1 rows exported . . exporting table MGR_SERVERYUMREPOSITORYINFORMA 1 rows exported . . exporting table MGR_SEVERITYCHANGEEVENT 9 rows exported . . exporting table MGR_STATISTICMANAGER 1 rows exported . . exporting table MGR_STATISTICSUBJECTLOG 3 rows exported . . exporting table MGR_STATISTICTYPELOG 41 rows exported . . exporting table MGR_STORAGEARRAYPLUGIN 1 rows exported . . exporting table MGR_STORAGEELEMENT 13 rows exported . . exporting table MGR_STORAGESELECTIONMANAGER 1 rows exported . . exporting table MGR_TASKENGINEPROPERTIES 1 rows exported . . exporting table MGR_TASKMANAGER 1 rows exported . . exporting table MGR_TREEMAP 195 rows exported . . exporting table MGR_TREESTORE 1077 rows exported . . exporting table MGR_USER 4 rows exported . . exporting table MGR_USERACCOUNT 4 rows exported . . exporting table MGR_USERSTORE 1 rows exported . . exporting table MGR_VIRTUALCDROM 3 rows exported . . exporting table MGR_VIRTUALDISK 1 rows exported . . exporting table MGR_VIRTUALMACHINE 1 rows exported . . exporting table MGR_VIRTUALMACHINECFGFILE 1 rows exported . . exporting table MGR_VIRTUALMACHINEDISCONNECTER 7 rows exported . . exporting table MGR_VIRTUALMACHINEOFFLINEEVENT 5 rows exported . . exporting table MGR_VIRTUALMACHINERUNNINGEVENT 15 rows exported . . exporting table MGR_VIRTUALMACHINESTARTINGEVEN 12 rows exported . . exporting table MGR_VIRTUALMACHINESTOPPEDEVENT 16 rows exported . . exporting table MGR_VIRTUALMACHINESTOPPINGEVEN 6 rows exported . . exporting table MGR_VMDISKMAPPING 2 rows exported . . exporting table MGR_VMSELECTIONMANAGER 1 rows exported . . exporting table MGR_VNIC 5 rows exported . . exporting table MGR_VNICMANAGER 1 rows exported . . exporting table MGR_VNICMANAGERPROPERTIES 1 rows exported . . exporting table MGR_VOLUMEGROUP 4 rows exported . . exporting table MGR_XENHYPERVISOR 2 rows exported . . exporting table ODOF_ID_TO_TYPE 4537 rows exported . . exporting table ODOF_NOT_TABLED 0 rows exported . . exporting table ODOF_SYS_PROPERTIES 2 rows exported . . exporting table ODOF_TYPE_TO_CLASS 123 rows exported . exporting synonyms . exporting views . exporting stored procedures . exporting operators . exporting referential integrity constraints . exporting triggers . exporting indextypes . exporting bitmap, functional and extensible indexes . exporting posttables actions . exporting materialized views . exporting snapshot logs . exporting job queues . exporting refresh groups and children . exporting dimensions . exporting post-schema procedural objects and actions . exporting statistics Export terminated successfully without warnings.
Una vez terminado ya tenemos el backup. Cerramos la shell de oracle y volvemos a root para arrancar de nuevo ovmm:
[root@oraclevmm]# /etc/init.d/ovmm start Starting Oracle VM Manager [ OK ]
En este otro artículo podéis ver el proceso de restauración de este backup:
Un comentario en “Cómo hacer un backup de Oracle VM Manager 3.1.1”
Comments are closed.