{IM運用}1.2.2 データベースのバックアップおよびリカバリー

  • 物理ホスト

(1)コマンド実行履歴
(2)監視オブジェクトDB
(3)ホスト情報DB
(4)イベントDB
(5)応答待ちイベント滞留ファイル

【1】バックアップ
/etc/opt/jp1cons/jco_stop
/opt/jp1base/bin/jbs_spmd_stop
/opt/jp1base/bin/jevstop
/opt/jp1base/bin/jevlogdstop

----コマンド実行履歴

tar cvzf /root/dbbuckup11.tgz /var/opt/jp1base/log/COMMAND
tar cvzf /root/dbbuckup12.tgz /var/opt/jp1cons/log/action/actinf.log
tar cvzf /root/dbbuckup13.tgz /var/opt/jp1cons/log/action/acttxt?.log

----監視オブジェクトDB
tar cvzf /root/dbbuckup21.tgz /var/opt/jp1scope/database/jcsdb

----ホスト情報DB
tar cvzf /root/dbbuckup31.tgz /var/opt/jp1scope/database/jcshosts


----イベントDB
tar cvzf /root/dbbuckup41.tgz /var/opt/jp1base/sys/event/servers/default

----応答待ちイベント滞留ファイル
tar cvzf /root/dbbuckup51.tgz /var/opt/jp1cons/log/response/resevent.dat


/opt/jp1base/bin/jbs_spmd
/opt/jp1base/bin/jevstart
/opt/jp1base/bin/jevlogdstart
/etc/opt/jp1cons/jco_start

/opt/jp1base/bin/jbs_spmd_status
/opt/jp1base/bin/jevstat
/opt/jp1base/bin/jevlogdstat
/opt/jp1cons/bin/jco_spmd_status

 

【2】リカバリ


/etc/opt/jp1cons/jco_stop
/opt/jp1base/bin/jbs_spmd_stop
/opt/jp1base/bin/jevstop
/opt/jp1base/bin/jevlogdstop

/opt/jp1base/bin/jbs_spmd_status
/opt/jp1base/bin/jevstat
/opt/jp1base/bin/jevlogdstat
/opt/jp1cons/bin/jco_spmd_status

mv /root/dbbuckup??.tgz /tmp

tar xvzf /tmp/dbbuckup11.tgz
tar xvzf /tmp/dbbuckup12.tgz
tar xvzf /tmp/dbbuckup13.tgz
tar xvzf /tmp/dbbuckup21.tgz
tar xvzf /tmp/dbbuckup31.tgz
tar xvzf /tmp/dbbuckup41.tgz
tar xvzf /tmp/dbbuckup51.tgz

----コマンド実行履歴
rm -rf /var/opt/jp1base/log/COMMAND
rm -rf /var/opt/jp1cons/log/action/actinf.log
rm -rf /var/opt/jp1cons/log/action/acttxt?.log

cp -a /tmp/var/opt/jp1base/log/COMMAND /var/opt/jp1base/log
cp -a /tmp/var/opt/jp1cons/log/action/actinf.log /var/opt/jp1cons/log/action
cp -a /tmp/var/opt/jp1cons/log/action/acttxt?.log /var/opt/jp1cons/log/action


----監視オブジェクトDB
rm -rf /var/opt/jp1scope/database/jcsdb

cp -a /tmp/var/opt/jp1scope/database/jcsdb /var/opt/jp1scope/database


----ホスト情報DB
rm -rf /var/opt/jp1scope/database/jcshosts

cp -a /tmp/var/opt/jp1scope/database/jcshosts /var/opt/jp1scope/database

 


----イベントDB
rm -rf /var/opt/jp1base/sys/event/servers/default

cp -a /tmp/var/opt/jp1base/sys/event/servers/default /var/opt/jp1base/sys/event/servers


----応答待ちイベント滞留ファイル
rm -rf /var/opt/jp1cons/log/response/resevent.dat

cp -a /tmp/var/opt/jp1cons/log/response/resevent.dat /var/opt/jp1cons/log/response

 


/opt/jp1base/bin/jbs_spmd
/opt/jp1base/bin/jevstart
/opt/jp1base/bin/jevlogdstart
/etc/opt/jp1cons/jco_start

/opt/jp1base/bin/jbs_spmd_status
/opt/jp1base/bin/jevstat
/opt/jp1base/bin/jevlogdstat
/opt/jp1cons/bin/jco_spmd_status

 


(6)IMデータベース
【1】バックアップ

※設定情報のバックアップも実施する

/etc/opt/jp1cons/jco_stop

/opt/jp1imm/bin/imdb/jimdbbackup -o /root/dbbuckup61.dmp -m MAINT


/etc/opt/jp1cons/jco_start
/opt/jp1cons/bin/jco_spmd_status

【2】リカバリ

※設定情報のリカバリも実施する

/etc/opt/jp1cons/jco_stop

/opt/jp1imm/bin/imdb/jimdbrecovery -i /root/dbbuckup61.dmp -m MAINT


/etc/opt/jp1cons/jco_start
/opt/jp1cons/bin/jco_spmd_status

 

 

 

  • 論理ホスト


(1)コマンド実行履歴
(2)監視オブジェクトDB
(3)ホスト情報DB
(4)イベントDB
(5)応答待ちイベント滞留ファイル

【1】バックアップ
/etc/opt/jp1cons/jco_stop.cluster mmm190
/etc/opt/jp1base/jbs_stop.cluster mmm190

/opt/jp1base/bin/jbs_spmd_status -h mmm190
/opt/jp1base/bin/jevstat mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190


----コマンド実行履歴

tar cvzf /root/dbbuckup11.tgz /mnt/sdc2/im/jp1base/log/COMMAND
tar cvzf /root/dbbuckup12.tgz /mnt/sdc2/im/jp1cons/log/action/actinf.log
tar cvzf /root/dbbuckup13.tgz /mnt/sdc2/im/jp1cons/log/action/acttxt?.log

----監視オブジェクトDB
tar cvzf /root/dbbuckup21.tgz /mnt/sdc2/im/jp1scope/database/jcsdb

----ホスト情報DB
tar cvzf /root/dbbuckup31.tgz /mnt/sdc2/im/jp1scope/database/jcshosts


----イベントDB
tar cvzf /root/dbbuckup41.tgz /mnt/sdc2/im/event

 

----応答待ちイベント滞留ファイル
tar cvzf /root/dbbuckup51.tgz /mnt/sdc2/im/jp1cons/log/response/resevent.dat


/etc/opt/jp1base/jbs_start.cluster mmm190
/etc/opt/jp1cons/jco_start.cluster mmm190

/opt/jp1base/bin/jbs_spmd_status -h mmm190
/opt/jp1base/bin/jevstat mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190

 

【2】リカバリ


/etc/opt/jp1cons/jco_stop.cluster mmm190
/etc/opt/jp1base/jbs_stop.cluster mmm190

/opt/jp1base/bin/jbs_spmd_status -h mmm190
/opt/jp1base/bin/jevstat mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190

mv /root/dbbuckup??.tgz /tmp

tar xvzf /tmp/dbbuckup11.tgz
tar xvzf /tmp/dbbuckup12.tgz
tar xvzf /tmp/dbbuckup13.tgz
tar xvzf /tmp/dbbuckup21.tgz
tar xvzf /tmp/dbbuckup31.tgz
tar xvzf /tmp/dbbuckup41.tgz
tar xvzf /tmp/dbbuckup51.tgz

----コマンド実行履歴
rm -rf /mnt/sdc2/im/jp1base/log/COMMAND
rm -rf /mnt/sdc2/im/jp1cons/log/action/actinf.log
rm -rf /mnt/sdc2/im/jp1cons/log/action/acttxt?.log

cp -a /tmp/mnt/sdc2/im/jp1base/log/COMMAND /mnt/sdc2/im/jp1base/log
cp -a /tmp/mnt/sdc2/im/jp1cons/log/action/actinf.log /mnt/sdc2/im/jp1cons/log/action
cp -a /tmp/mnt/sdc2/im/jp1cons/log/action/acttxt?.log /mnt/sdc2/im/jp1cons/log/action


----監視オブジェクトDB
rm -rf /mnt/sdc2/im/jp1scope/database/jcsdb

cp -a /tmp/mnt/sdc2/im/jp1scope/database/jcsdb /mnt/sdc2/im/jp1scope/database


----ホスト情報DB
rm -rf /mnt/sdc2/im/jp1scope/database/jcshosts

cp -a /tmp/mnt/sdc2/im/jp1scope/database/jcshosts /mnt/sdc2/im/jp1scope/database

 


----イベントDB
rm -rf /mnt/sdc2/im/event

cp -a /tmp/mnt/sdc2/im/event /mnt/sdc2/im


----応答待ちイベント滞留ファイル
rm -rf /mnt/sdc2/im/jp1cons/log/response/resevent.dat

cp -a /tmp/mnt/sdc2/im/jp1cons/log/response/resevent.dat /mnt/sdc2/im/jp1cons/log/response

 


/etc/opt/jp1base/jbs_start.cluster mmm190
/etc/opt/jp1cons/jco_start.cluster mmm190

/opt/jp1base/bin/jbs_spmd_status -h mmm190
/opt/jp1base/bin/jevstat mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190

 


(6)IMデータベース
【1】バックアップ

※設定情報のバックアップも実施する

/etc/opt/jp1cons/jco_stop.cluster mmm190

/opt/jp1imm/bin/imdb/jimdbbackup -o /root/dbbuckup61.dmp -m MAINT -h mmm190


/etc/opt/jp1cons/jco_start.cluster mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190

【2】リカバリ

※設定情報のリカバリも実施する

/etc/opt/jp1cons/jco_stop.cluster mmm190

/opt/jp1imm/bin/imdb/jimdbrecovery -i /root/dbbuckup61.dmp -m MAINT -h mmm190


/etc/opt/jp1cons/jco_start.cluster mmm190
/opt/jp1cons/bin/jco_spmd_status -h mmm190