informix数据库

Informix 0级备份和恢复

2017-02-16  本文已影响144人  也然君

===生产机上0级备份===
先改onconfig.posjl配置文件TAPEDEV和TAPESIZE

System Archive Tape Device

TAPEDEV /home/informix/bak/lev0_0819 # Tape device path
TAPEBLK 32 # Tape block size (Kbytes)
TAPESIZE 4000000 # Maximum amount of data to put on tape (Kbytes)
(TAPESIZE不能太小)
[informix@pos206 yuy]$ touch lev0_0819(要有写权限)
[informix@pos206 yuy]$ ontape -s -L 0

===异机进行0级恢复===
把lev0文件ftp到目的机器的对应目录,sqlhosts和onconfig需一致,数据文件名一致(权限660,如是裸设备需lv大小一致,或比原生产大才行),down库状态下进行0级恢复:
[informix@pos146 etc]$ ontape -r
...........................
Continue restore? (y/n)y
Do you want to back up the logs? (y/n)n
Restore a level 1 archive (y/n) n
Do you want to restore log tapes? (y/n)n
/home/informix/bin/onmode -sy
Program over.

[informix@pos146 etc]$ onstat -
IBM Informix Dynamic Server Version 10.00.UC9 -- Fast Recovery (CKPT REQ) -- Up 00:11:32 -- 46584 Kbytes
Blocked:CKPT

待到 Quiescent 状态
[informix@pos146 etc]$ onstat -
IBM Informix Dynamic Server Version 10.00.UC9 -- Quiescent -- Up 00:15:34 -- 46584 Kbytes

[informix@pos146 etc]$ onmode -m
起到online
[informix@pos146 etc]$ onstat -
IBM Informix Dynamic Server Version 10.00.UC9 -- On-Line -- Up 00:15:51 -- 46584 Kbytes

完成!

上一篇下一篇

猜你喜欢

热点阅读