- 论坛徽章:
- 0
|
在用omni dp做完备份后,希望通过接口程序对备份的session 进行导出并展示,但TNND HP不配合,不给API
没办法,只得写脚本导成文本文件了
dp_bk# more omni*
#! /usr/bin/sh
#This script use for export db idb backup session and session messages ;
#It export the infomation to a log file ,and then put it to report machine;
for SESS_ID in `/opt/omni/bin/omnidb -session -last 1 -detail |grep SessionID |cut -d: -f2`
do
SESS_FILE=`echo "$SESS_ID"|sed 's/\//_/g'`
/opt/omni/bin/omnidb -session $SESS_ID -report >/tmp/omni/$SESS_FILE
done
dp_bk#
dp_bk# pwd
/tmp/omni
dp_bk# ls
2009_02_24-1 2009_02_24-24 2009_02_24-39 2009_02_24-53 2009_02_25-19 2009_02_25-33
2009_02_24-10 2009_02_24-25 2009_02_24-4 2009_02_24-54 2009_02_25-2 2009_02_25-34
2009_02_24-11 2009_02_24-26 2009_02_24-40 2009_02_24-6 2009_02_25-20 2009_02_25-35
2009_02_24-12 2009_02_24-27 2009_02_24-41 2009_02_24-7 2009_02_25-21 2009_02_25-36
2009_02_24-13 2009_02_24-28 2009_02_24-42 2009_02_24-8 2009_02_25-22 2009_02_25-37
2009_02_24-14 2009_02_24-29 2009_02_24-43 2009_02_24-9 2009_02_25-23 2009_02_25-4
2009_02_24-15 2009_02_24-3 2009_02_24-44 2009_02_25-1 2009_02_25-24 2009_02_25-5
2009_02_24-16 2009_02_24-30 2009_02_24-45 2009_02_25-10 2009_02_25-25 2009_02_25-6
2009_02_24-17 2009_02_24-31 2009_02_24-46 2009_02_25-11 2009_02_25-26 2009_02_25-7
2009_02_24-18 2009_02_24-32 2009_02_24-47 2009_02_25-12 2009_02_25-27 2009_02_25-8
2009_02_24-19 2009_02_24-33 2009_02_24-48 2009_02_25-13 2009_02_25-28 2009_02_25-9
2009_02_24-2 2009_02_24-34 2009_02_24-49 2009_02_25-14 2009_02_25-29 omnidbexport.sh
2009_02_24-20 2009_02_24-35 2009_02_24-5 2009_02_25-15 2009_02_25-3
2009_02_24-21 2009_02_24-36 2009_02_24-50 2009_02_25-16 2009_02_25-30
2009_02_24-22 2009_02_24-37 2009_02_24-51 2009_02_25-17 2009_02_25-31
2009_02_24-23 2009_02_24-38 2009_02_24-52 2009_02_25-18 2009_02_25-32
dp_bk#
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/18055/showart_1843135.html |
|