本文共 2609 字,大约阅读时间需要 8 分钟。
如果我们的数据库那天日志没有备份完,而此时数据库突然宕掉后不能启动,那么我们的这几个日志就没有备份。如果此时恢复的话是有几个日志不能恢复的,为了不让我们的数据丢失,我们就需要把没有备份的日志备份到磁带上。
用onbar -b -l -s起用抢救模式,在数据库停止的状态下可以备份日志。
这个也是出了问题在领导那里学习的,以前没有用过。呵呵。
[informix@test ~]$ onbar/home/informix/bin/onbar_d onbar usageBACKUP & VERIFICATION
=====================For IBM Informix Dynamic Server: -b [-L ] [-w | -f | ] [-O] -b -F -b -l [-c | -C | -s] [-O] -v [-w] [-p] [-t ] [-f | ]-b backup
-c backup current logical log -C continuous logical log backup -f pathname of file containing list of storage spaces -F fake backup -l backup full logical logs (no spaces) -L backup level: 0, 1, or 2, defaults to 0 -O override internal error checks - enforce policy strictly -p backup spaces only (no logs) -w whole system backup -s salvage logs -v verify consistency of most recent backups list of storage spaces to backuponbar usageRESTORE
========For IBM Informix Dynamic Server: -r [-e] [-O] [-f | ] -r [-e] [-t | -n ] [-O] -r -p [-e] [-t ] [-O] [-f | ] -r -l [-t | -n ] -r -w [-e] [[-p] [ -t ] | -n ] [-O] -RESTART -r -rename -f [-w] [-p] [-t | -n ] [-f | ] -r {-rename -p -o -n -o ...} [-w] [-p] [-t | -n ] [-f | ]-e external restore
-f pathname of file containing list of storage spaces -l logical log only restore (no spaces) -n last logical log to restore -O override internal error checks - enforce policy strictly -p physical only restore (no logs) -r restore -t point in time to stop restore -w whole system to restore -RESTART restart an interrupted restore list of storage spaces to restore -rename rename chunks during cold restore With -rename option: -rename -f pathname of file containing list of mapped chunk pathnames and offsets -p old pathname of chunk -o old offset of chunk -n new pathname of chunk -o new offset of chunkonbar usageMESSAGING
=========For IBM Informix Dynamic Server:-m [] [-r []]
-m Displays last of onbar's activity log file (default: 20 lines)
-r Repeat display every seconds (default: 5 seconds)onbar usage
LOGICAL-LOG(S) DISPLAY======================For IBM Informix Dynamic Server: {-P} {-n | ending log unique identifier>} [-l] [-q] [-b] [-u ] [-t ] [-x-P Print backed up logical-log(s) information
-n Display the specified log identifier(s) -l Display maximum information about each log record -q Do not display program header -b Display information about logged BLOB pages -u Display the specified user(s) -t Display the specified TBLspace(s) -x Display the specified transaction(s)[informix@test ~]$来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-245622/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/312079/viewspace-245622/