Storage NetApp configuration oracle agent for storage backup integration

** Myself
This Example  for config oracle agent with NetAPP storage(OEM IBM N-Series) for backup without script freeze and unfreeze database and cloning or snapshot to new backup database to Disk (back to disk)

ตัวอย่างนี้เป็นการ config oracle agent ของ NetApp(หรือ OEM IBM N-Series) เพื่อใช้ในการ backup  โดยไม่ต้องมาเขียน script freeze database แล้ว clone หรือ snapshot เป็น data อีกชุดนึงเพื่อ backup เก็บไว้ใน disk (back to disk)

Environment testing
-- Linux with oracle (Install SMO agent and Snapdrive)
-- Storage NetApp
 
Install SMO for Host
Install snapdrive
rpm –ivh netapp.snapdrive.linux_2_2.rpm


Install java runtime and smo agent

./netapp.smo.linux-2.0.0.bin
./jre-1_5_0_10-linux-i586-rpm.bin

Configure snapdrive to Storage with root and admin password
#FAS3020DEMO is storage name
snapdrive config set root FAS3020DEMO
snapdrive config set administrator FAS3020DEMO
/opt/NetApp/snapdrive/snapdrive.conf
Create lun and Create snapshot
#Prepare lun
snapdrive config prepare luns -count 32
#Create lun
snapdrive storage create -lun FAS3020DEMO:/vol/vol1/test -lunsize 10m
#Scan disk from iscsi
iscsi-ls –l
#Snapshot lun
snapdrive snap create -lun FAS3020DEMO:/vol/vol1/test -snapname testsnap
#Start/Stop/Status smo server
smo_server start/stop/status
Create repository
#prepare user/password user in database with grant connect.resource and tablespace to user
# Create Tablespace for user
CREATE TABLESPACE userdata DATAFILE '/oracle/oradata/SMO/userdata01.dbf' SIZE 100M AUTOEXTEND ON NEXT 5M MAXSIZE 200M;
# Create user on Tablespace
CREATE USER smorepo IDENTIFIED BY smorepo DEFAULT TABLESPACE userdata DEFAULT TEMPORARY TABLESPACE temp;
# Grant connect.resource and tablespace to user
grant connect,resource to smorepo;
#Create repository of SMO (SMOREPO is SID of repository)
smo repository create -repository -dbname SMOREPO -login -username smorepo -password smorepo -host localhost -port 1521
Create profile from repository to access database for backup
#Create profile MYTEST for connect DEV database
#localhost in this case, is repository(SMOREPO) and database(DEV) on same machine
smo profile create -profile MYTEST -repository -dbname SMOREPO -login -username smorepo -password smorepo -port 1521 -host localhost -database -dbname DEV -sid DEV -login -username sys -password oracle -port 1521 -host localhost -retain 5 -osaccount oracle

Backup tablespace in database with profile
smo backup create -profile MYTEST -online -tablespaces test -label mytest_online_tbs_test -force

0 comments:

Loading