News
-
Ontape -r恢复大总结
By lianyong(wangly@ustc.edu) 2003/12/22以下是我做ontape -r 的总结,我只是将自己的经验共享出来(因为我看到论坛里虽然有这方面的帖子,但都不是很详细)因为整个过程只是在我能接触的特有的环境中完成,所以如有错误之处欢迎大家指正。。。主要分六个部分1.恢复的前提 2.详细恢复过程 3.对恢复期间的监视4.恢复成功整个过程的online.log5.恢复过程中我曾遇到的问题6.常用到的命令一、恢复的前提(从多次恢复过程可以总结如下:)我用ontape备份的数据恢复到另一台服务器上时,环境如下1.两台服务器机型一样(HPL2000系列)2.操作系统一样(HP-UX B.11.00)、数据库版本一样(IDS7.31.FC6)、3.非临时分配的Dbspace磁盘空间数量和大小必须一致(即你的各个dbspace对应的chunk大小一样,所对应的符号联接所在目录的位置最好也保证一样)4.Onconfig配置文件(最后提出来!它并不要求完全一样!!!)就以我恢复的机器来说,它和做0级备份的生产机虽然都是hp小型机,但cpu个数,内存,硬盘个数都不一样,故onconfig相应的参数例如NETTYPE、NUMCPUVPS 都不一样,但我保证了如下参数在onconfig中的一致:ROOTNAME ROOTPATH ROOTOFFSET ROOTSIZE MIRRORMIRRORPATHMIRROROFFSETTAPEDEVTAPEBLKTAPESIZELTAPEDEVLTAPEBLKLTAPESIZELOGSMAX其它的都没变化了,反正我这样做是成功了。。。)注意的问题:在恢复过程中,如果恢复失败,则可能恢复机上的数据库oninit起不来,则只好用oninit -i来初始化了--(((,我没找到好的方法。。。-----------------------------------------------------------------------------------------------------------------------------------------------------------------二、详细恢复过程:(只做0级恢复)1。切换成informix用户,(这一步根据实际情况选做)ps -ef |grep isql ,如有此进程,kill掉2.用ipcs 查看还有无其它数据库用户占用的共享内存确认后以上后(如上述共享内存还存在,则可能会在ontape -r过程中会报 “共享内存初始化失败”,而导致恢复失败!!!)3.onmode -ky下掉数据库hp9000:/informix/etc>;ontape -rPlease mount tape 1 on /dev/rmt/0m and press Return to continue ...Archive Tape InformationTape type: Archive Backup TapeOnline version: Informix Dynamic Server Version 7.31.FC6 Archive date: Wed Dec 3 16:50:54 2003User id: hcbTerminal id: /dev/pts/10Archive level: 0Tape device: /dev/rmt/0mTape blocksize (in k): 4096Tape size (in k): 25165824Tape number in series: 1。。。。。。。。。。。。。。。这里显示的是备份的磁盘配置(可验证是否生成了正确的设备和连接)。包括dbspace和chunk等情况。省略了。。。1。Continue restore? (y/n)y2。Do you want to back up the logs? (y/n)n------------------------------------进入FastRecovery状态(onstat -观察)/*此时间开始进行恢复,时间较长,且没有完成百分比提示,请耐心等待*/3。Restore a level 1 archive (y/n) n---------------------------------------此步应回答为n,不需要进行1级恢复4。Do you want to restore log tapes? (y/n)n------------------------------------------此步应回答为n,不需要进行日志恢复Program over. /*恢复完成*//home/informix/bin/onmode -sy /*数据库自动进入quiescent 模式*//*此期间会存在一个fast recovery模式,直至进入quiescent 模式。可用onstat -、onstat -d监测数据库的情况。*/5。 如onstat - 显示 已经进入quiescent模式,则手工执行: onmode -m /*使数据库online*/6。完成。(整个过程为3小时20分钟,24G磁带)--------------------------------------------------------------------------------------~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~三、对恢复期间的监视在恢复DBSPACE期间,由于online.log不更新(我也不知道为什么,是有问题?反正tail -f online.log没有变化),所以监视恢复状况我就采用onstat来分析hp9000:/informix>;onstat -d(可观察基本的dbspace情况)Informix Dynamic Server Version 7.31.FC6 -- Fast Recovery (CKPT REQ) -- Up 00:59:30 -- 316616 KbytesBlocked:CKPThp9000:/informix>;onstat -u(查看磁带读写速度)Informix Dynamic Server Version 7.31.FC6 -- Fast Recovery (CKPT REQ) -- Up 01:30:48 -- 316616 KbytesBlocked:CKPTUserthreadsaddress flags sessid user tty wait tout locks nreads nwritesc000000011053028 ---P--D 1 informix - 0 0 0 11 3c0000000110536f0 ---P--F 0 informix - 0 0 0 0 0c000000011053db8 ---P--F 0 informix - 0 0 0 0 0c000000011054480 ---P--F 0 informix - 0 0 0 0 0c000000011054b48 Y--P--M 13 informix to c0000000114898e0 0 0 0 0c000000011055210 ---P--- 14 informix - 0 0 0 0 0c0000000110558d8 ---P--B 15 informix - 0 0 0 0 0c000000011055fa0 ---P--D 16 informix - 0 0 0 0 0c000000011056668 -----R- 13 informix to 0 0 0 5 45430069 active, 128 total, 9 maximum concurrent 5046814 5857822 6066718 Mon Dec 15 22:21:56 EAT 2003 6498846 Mon Dec 15 22:30:15 EAT 2003 7029278 Mon Dec 15 22:40:37 EAT 2003 8221214 Mon Dec 15 23:02:08 EAT 2003 10506782 Mon Dec 15 23:44:14 EAT 2003主要看nwrites那一列的数据变化,应该是按时间不断增大。。。hp9000:/informix>;sar -d 2 20查看磁盘读写状态,通过逻辑卷管理的硬盘,例如对c0t9d0(我的机器正是将dbspace对应的裸设备建在此硬盘组成的逻辑卷上)的读写可监视恢复是否正常进行。。。--------------------------------------------------------------------------------------------------------四、恢复成功整个过程的online.log-----------------------------------------------------------------------------------------------------------------------------20:22:54 Dynamically allocated new virtual shared memory segment (size 8192KB)20:22:54 Dynamically allocated new virtual shared memory segment (size 8192KB)20:22:54 Physical Restore of rootdbs, hcbdbs, logdbs started.20:23:03 Checkpoint Completed: duration was 0 seconds./*在恢复DBSPACE过程中无日志!?*/23:49:40 Checkpoint Completed: duration was 0 seconds.23:49:41 Checkpoint Completed: duration was 0 seconds.23:49:41 Physical Restore of rootdbs, hcbdbs, logdbs Completed.23:49:41 Checkpoint Completed: duration was 0 seconds.23:52:13 Physical Recovery Started.23:52:13 Physical Recovery Complete: 0 Pages Restored.23:52:13 Logical Recovery Started.23:52:16 Logical Recovery Complete. 0 Committed, 0 Rolled Back, 0 Open, 0 Bad Locks23:52:16 Bringing system to Quiescent Mode with no Logical Restore.23:52:17 Quiescent Mode23:52:17 Checkpoint Completed: duration was 0 seconds.23:53:22 On-Line Mode23:53:22 Affinitied VP 3 to phys proc 123:53:22 Affinitied VP 1 to phys proc 023:57:26 Checkpoint Completed: duration was 1 seconds.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------五、恢复过程中我曾遇到的问题:0。恢复过程失败,online.log里提示“共享内存初始话失败” 可能恢复前虽然数据库已下掉,但共享内存还有相关未清除掉的东东,ipcs看看,然后杀掉1。提示原dbspace和chunk和恢复机上的不一致, 这时要根据备份带上给的dbspace情况新建chunk对应的裸设备和符号连接2。恢复过程出现以下错误:Continue restore? (y/n)yDo you want to back up the logs? (y/n)nUnable to open input file 's'Unable to open input file 'c'Physical restore failed - buc_fe.c : Archive API processing failed at line 703 for msgtypeProgram over.处理:请先检查dbspace对应裸设备文件及符号连接和所在目录的权限和属性,保证正确!!!如没有问题,Do the following commands as root:# vi /etc/privgroup and add the following lineinformix MLOCK# getprivgrpglobal privileges: CHOWN# setprivgrp -f /etc/privgroup# getprivgrpglobal privileges: CHOWNinformix: MLOCK然后再做恢复。。。----------------------------------------------------------------------------------------------------------六、常用到的命令oninitoninit -iy (初始化数据库,删除所有dbspace和chunk)oninit -s (脱机-->;静态)onmode -ky offlineonmode -s graceful shutdown-->;quiescent(联机到静态,让用户处理完成)onmode -u immediate shutdown-->;quiescent(联机到静态,所有用户立即终止)onmode -m quiescent--->;onlineonstat - 查看服务器状态onstat -d 查看dbspace和chunk情况onstat -l 查看逻辑日志ipcs 查看共享内存情况ipcrm 删除某个共享内存ipcrm -m idipcrm -s id有关逻辑日志的操作以informix用户登录, $ onmode -uy (由Online切换到Quiescent状态,所有用户立即中止) onmode -m (切换到Online) $ onparams -a -d logdbs -s 100000 (在logdbs中增加逻辑日志) 其中logdbs为dbspaces 名 ,-s 100000 表示增加了100M空间。 再连续执行4遍上述命令,这样新的逻辑日志空间总共为500M,可以用 onstat -l 查看逻辑日志情况,接下来就要删除前面3个旧逻辑日志, 删除前做一个0级备份 # ontape -s -L 0 执行该命令做0级备份,建议: 如果允许可以每天在业务系统结束工作 后做一次0级备份,做完备份后管理好备份磁带,做好标记。 $ onparams -d -l logid logid 为逻辑日志id号,可以用onstat -l 查看,然后就可根据id号删 除3个旧逻辑日志。1.增加一个新的dbspace:(datadbs,15M, 偏移为0)onspaces -c -d datadbs -p /home/informix/datadbs -o 0 -s 150002.在datadbs这一个dbspace中增加一个chunkdatadbs_chunk1)onspaces -a datadbs -p /home/informix/datadbs_chunk1 -o 0 -s 150003.将上述chunk删除onspaces -d datadbs -p /home/informix/datadbs_chunk1 -o 04.删除dbspace(仅当要删除的dbspace空间没有数据时才可删除)onspace -d datadbs导出数据库: 用dbexport工具将数据卸成文本,并装载到其它服务器上。(1) 卸载文本的步骤如下: 用informix用户注册 dbexport cleardb -o WORKDIR -ss 当系统提示dbexport completed!数据卸载完毕。其中: -ss 确保数据库的建库信息或建表信息被保留如日志模式、初始extent尺寸、lock mode、表所在dbspace等。 -o 指定存放卸载数据的目录数据存放在目录cleardb.exp目录下,其中包含cleardb.sql和形如*.unl的文件, 提示信息存放在dbexport.out文件中。(2) 装载文本的步骤如下: 用informix用户注册确保数据库处于On_Line状态,服务器上没有同名数据库。 dbimport cleardb -i WORKDIR 当系统dbimport completed!提示数据装载完毕。其中:-i 指定从何处装载。如何在不破坏库本身信息情况下(如行级锁等)将数据库卸载到磁带设备,并装载在其它服务器上?1) 卸载的步骤如下: 用DBA用户注册 将存放数据的磁带插入磁带机,确认磁带及磁带机完好可用。 dbexport cleardb -t /dev/rmt/0m -b 512k -s 2048000k -ss当系统提示dbexport completed!数据卸载完毕。其中: -ss 确保数据库的建库信息或建表信息被保留如日志模式,初始extent尺寸,lockmode,表所在dbspace -t 磁带设备/dev/rmt/0m -s 磁带容量2G -b 块大小512KB 提示信息存放在dbexport.out文件中2) 装载的步骤如下: 用DBA用户注册 将存放卸载数据的磁带放在磁带机上,确认磁带机正常,确认数据库系统处于On_Line状态,服务器上没有同名数据库。 $ dbimport cleardb -t /dev/rmt/0m -b 512k -s 2048000k 当系统dbimport completed 提示数据装载完毕!提示信息存放在dbimport.out 文件中。
-
"Ex 1.10 (A 2 4)" by zarchne
Paste number 7232:Ex 1.10 (A 2 4)Pasted by:zarchne2 years, 2 months ago#sicp |Context in IRC logsPaste contents:(A 2 4) 65536 (A 1 (A 2 3)) 2^(A 1 (A 2 2)) 2^2^(A 1 (A 2 1)) 2^2^2^2 2^2^4 2^16 65536.html?utime=3321799914&channel=sicp&start=3321796319&end=3321803519#utime_requested">Context in IRC logsPaste contents:(A 2 4) 65536 (A 1 (A 2 3)) 2^(A 1 (A 2 2)) 2^2^(A 1 (A 2 1)) 2^2^2^2 2^2^4 2^16 65536.com/cview
-
Welcome to my kitchen, and welcome (to my) Home
Ultimately it is all about being comfortable, and so now that I have been in my new home for almost 3 month I have to admit that for the first time since I left my home in Germany in January of 1991 (at the age of 24) that I slowly get used to the idea that I am 'at' home. Cooking my own food in my own kitchen makes me realize how this is all a very new experience for me. I am used to moving around from place to place for the past years, so during all that time, but even before I left my native country of Germany in January of 1991, and especially since I lived as part of a very different culture for more than a decade I knew deep down that home not only refer to the place we grow up in, but that home is where the heart is, and so that if you are in touch with your heart-essence, you are always 'at' home, wherever that might be. Remember, This world is (y)our home, so make yourself comfortable. Author: realize2actualize Keywords: home learning growing building creating life essence community Added: August 6, 2007
-
Sell Straw Mat
1.Mat measures 180cm from end to end and 60 across.2.Great for out door activities and parties!
-
50 MILLS and boon books
for sell £20 w...