分类: DB2/Informix
2008-04-13 22:33:06
如果我们的数据库那天日志没有备份完,而此时数据库突然宕掉后不能启动,那么我们的这几个日志就没有备份。如果此时恢复的话是有几个日志不能恢复的,为了不让我们的数据丢失,我们就需要把没有备份的日志备份到磁带上。
用onbar -b -l -s起用抢救模式,在数据库停止的状态下可以备份日志。
这个也是出了问题在领导那里学习的,以前没有用过。呵呵。
[informix@test ~]$ onbar
/home/informix/bin/onbar_d
onbar usage
BACKUP & VERIFICATION
=====================
For IBM Informix Dynamic Server:
-b [-L
-b -F
-b -l [-c | -C | -s] [-O]
-v [-w] [-p] [-t
-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
onbar usage
RESTORE
========
For IBM Informix Dynamic Server:
-r [-e] [-O] [-f
-r [-e] [-t
-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
-rename rename chunks during cold restore
With -rename option:
-rename -f
chunk pathnames and offsets
-p old pathname of chunk
-o old offset of chunk
-n new pathname of chunk
-o new offset of chunk
onbar usage
MESSAGING
=========
For IBM Informix Dynamic Server:
-m [
-m Displays last
-r Repeat display every
onbar usage -P Print backed up logical-log(s) information
LOGICAL-LOG(S) DISPLAY
======================
For IBM Informix Dynamic Server:
{-P} {-n
[-t
-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 ~]$