ONTAPE -R recovery big summary

xiaoxiao2021-03-06  41

Here is the summary of I do what to do, I just shared my experience (because I saw that although there is a post in the forum, it is not very detailed) because the whole process is just a unique environment I can contact. Completed in the middle, please welcome everyone if there is any error. . . Mainly divided into six parts 1. Restore premise 2. Detailed recovery process 3. Surveillance during recovery 4. Online.log 5 that recovered successfully process, I have encountered during the recovery 6. Commonly used commands The recovery premise (from multiple recovery procedures can be summarized as follows :) When the data backup of the ONTAPE backup is restored to another server, the environment is as follows 1. Two server models (HPL2000 Series) 2. The operating system is the same HP-UX B.11.00), the database version is the same (IDS7.31.fc6), 3. Non-temporary allocation of DBSpace disk space quantity and size must be consistent (ie, the corresponding chunk size, the corresponding symbol connection The location of the directory is also guaranteed to be the same) 4.onfig configuration file (finally commented! It does not require exactly the same !!!) Take the machine I recovered, it and the production machine for the 0-level backup It is HP mini machine, but the number of CPUs, memory, and hard disk are different. Once onconfig corresponds to the parameters such as Nettype, Numcpuvps is different, but I assure the following parameters in the onConfig: rootsize mirror mirrorpath Mirroroffset TapeDev Tapeblk Tapesize LTAPEDEV LTAPEBLK LTAPESIZE LOGSMAX has not changed, anyway, I have been successful. . . ) Note: During the recovery process, if the recovery fails, the database Oninit on the recovery can not be found, but I have to initialize the onInit -i - (((((, I didn't find a good method ... -------------------------------------------------- ------------------------------------------------- -------------------------------------------------- ---------- Second, the detailed recovery process: (only 0 level recovery) 1.

Switch into an Informix user, (this step is selected according to the actual situation) PS-EF | GREP ISQL, if there is this process, KILL drop 2. Use IPCS to view the shared memory other than other database users to confirm after confirmation (as described above) The shared memory still exists, may report "shared memory initialization failure" during the onTape -R process, resulting in recovery failure !!!) 3.onmode -ky down the database HP9000: / informix / etc> Ontape -R please mount tape 1 on / dev / rmt / 0m and press Return to continue ... Archive Tape Information Tape type: Archive Backup Tape Online version: Informix Dynamic Server Version 7.31.FC6 Archive date: Wed Dec 3 16:50:54 2003 User ID: HCB Terminal ID: / dev / PTS / 10 Archive Level: 0 Tape Device: / DEV / RMT / 0M Tape Blocksize (in k): 25165824 Tape Number In Series: 1. . . . . . . . . . . . . . . Here, it is shown that the backup disk configuration (verifiable is a correct device and connection). Includes dbspace and chunk, etc. Omitted. . . 1. CONTINUE RESTORE? (Y / N) Y 2. Do you want to back up the logs? (Y / n) n ----------------------------------- - Enter the FastRecovery Status (onstat - observation) / * This time begins to recover, longer, and no percentage prompt, please wait patiently * / 3. RESTORE A Level 1 Archive (Y / N) N --------------------------------------- This step should answer N, no need to recover level 1 recovery 4. Do you want to restore log tape? (Y / n) n ---------------------------------------------------------------------------------------------------------------- ------ This step should answer N, do not need log recovery Program over. / * Restore completion * / / home / information / information automatic access quiescent mode * / / * This period There will be a FAST Recovery mode until you enter the Quiescent mode. Available onStat -, onstat -d to monitor the database. * / 5. If OnStat - Display has entered the Quiescent mode, manually execute: onmode -m / * makes the database online * / 6. carry out.

(The whole process is 3 hours 20 minutes, 24G tape) ------------------------------------ ---------------------------------- ~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ 3, monitoring during recovery during the restoration dbspace, due to Online. Log is not updated (I don't know why, is there any problem? Anyway, tail -f online.log has no change), so monitoring recovery status I use onstat to analyze HP9000: / informix> onstat -d (Observer Basic dbspace) ) Informix Dynamic Server Version 7.31.fc6 - Fast Recovery (CKPT Req) - up 00:59:30 - 316616 KBytes Blocked: CKPT HP9000: / Informix> Onstat -u (View Tape Read / Write Speed) Informix Dynamic Server Version 7.31.FC6 - Fast Recovery (CKPT Req) - UP 01:30:48 - 316616 Kbytes,: ckpt UserThreads Address Flags Sessid User Tty Wait Tout Locks Nustoms NWRITES C000000011053028 --- P - D 1 Informix - 0 0 0 11 3 C0000000110536F0 --- P - F 0 Informix - 0 0 0 0 0 C000000011053DB8 --- P - F 0 Informix - 0 0 0 0 0 C000000011054480 --- P - F 0 Informix - 0 0 0 0 0 C000000011054B48 Y - P - M 13 Informix To C0000000114898E0 0 0 0 0 C000000011055210 --- P --- 14 Informix - 0 0 0 0 0 C0000000110 558D8 --- P - B 15 Informix - 0 0 0 0 C000000011055FA0 --- P - D 16 Informix - 0 0 0 0 0 C000000011056668 ----- R- 13 Informix To 0 0 0 5 4543006 9 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 mainly looks at the data change of NWRITES, which should be increasing in time. . . HP9000: / Informix> SAR-D 2 20 View disk read and write status, hard drives managed by logical volumes, such as C0T9D0 (my machine is a logical volume of DBSpace in this hard disk) Write to monitor whether recovery is done normally. . .

-------------------------------------------------- -------------------------------------------------- ---- Fourth, restore successful processes 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 /. * There is no log during the restoration 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 Complete: 0 Pages Rest. 23:52:13 Logical. 23:52:13 Logical. 23:52:13 Logical Recovery. Sikiş sikiş sikiş 06:52: 2:22 on -Line Mode 23:53:22 AffInitied VP 3 To Phys Proc 1 23:53:22 AffInitied VP 1 To Phys Proc 0 23:57:26 Checkpoint Completed: DURATION WAS 1 Seconds. ---------- -------------------------------------------------- -------------------------------------------------- ---------- -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- ---------------------------- Five, I have encountered problems during recovery : 0. The recovery process failed, "Online.log prompts" Shared Inclusion Biography "may be restored, although the database is already off, but the shared memory has the relevant Dongdong, IPCS looks, then kills 1.

Tip the inconsistency on the original DBSpace and the CHUNK and the recovery. At this time, the bare devices and symbolic connections corresponding to the CHUNK should be created according to the DBSPACE given on the backup. The following error occurred in the recovery process: Continue Restore? (Y / N) Y do you want to back up the logs? (Y / n) n unable 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 MsgType Program over. Process: Please check the dbspace to respond to naked device files and symbolic connections and the privileges and attributes to ensure correct! ! ! If there is no problem, Do the following commands as root: # vi / etc / privgroup and add the following line informix MLOCK # getprivgrp global privileges: CHOWN # setprivgrp -f / etc / privgroup # getprivgrp global privileges: CHOWN informix: MLOCK then do restore. . . -------------------------------------------------- -------------------------------------------------- ------ Sixth, commonly used commands oninit oninit -iy (initialized database, remove all dbspace and chunk) Oninit -S (offline-> static) onmode-ky offline onmode -s graceful shutdown -> quiescent (Online to static, let the user processing) ONMODE -U IMMEDIAT SHUTDOWN -> Quiescent (online to static, all users to terminate immediately) OnMode -M Quiescent ---> Online OnStat - View Server Status Onstat -d View dbspace and Chunk • Onstat -l View Logical Log IPCS View Shared Memory Situation IPCRM Deletes a Shared Memory IPCRM -M ID IPCRM -S ID Login about logical logs, $ ONMODE -UY (Switch by ONLINE to Quiescent Status, all users Stop immediately) Onmode -m (Switch to Online) $ onparams -a -d logdbs -s 100000 (adding logical logs in logDBS) where logDBs is DBSPACES name, and -s 100000 indicates an increase of 100m space. Then, the above command is continuously executed, so that the new logical log space is 500m, you can use onstat -l to view the logical log case, then delete the previous three old logical logs, and do a 0-level backup before deleting. OnTape -S -L 0 executes this command to do a 0-level backup, suggesting that if you allow you to do a 0-level backup after the business system ends every day, manage your backup tape and make a tag. $ onparams -d -l logid logid is the logical log ID number, you can view onstat -l, then remove 3 old logical logs according to ID numbers.

转载请注明原文地址:https://www.9cbs.com/read-119407.html

New Post(0)