Document TypeㅣTechnical Information
CategoryㅣBackup/Recovery
Applicable Product Versionㅣ7FS02PS
Document NumberㅣTBATI021
Overview
This document explains recovery using the RMGR command in case of TAS failure.
NoteThe online manual only explains examples of the tbrmgr command, so this scenario was created accordingly.
Method
(TAS-TAC) Recovery Test Using RMGR in Case of TAS Failure
Note
This recovery test is conducted in a situation where only a full backup with tbrmgr has been taken.
Reconstruct TAS Diskspace
Create the Diskspace with the same configuration as before.
CautionBefore reconstructing the TAS DiskSpace, be sure to back up the .passwd file.If you have not backed it up, you can boot without the .passwd file by using the parameter _MOUNT_MODE_WITHOUT_PASSWD_FILE=Y, and after normal booting, this parameter should be removed.
This statement is not created as a separate backup statement. Check sys.log if necessary.
Execute on TAS
$ tbboot nomount $ tbsql sys/tibero SQL> CREATE DISKSPACE DS0 FORCE EXTERNAL REDUNDANCY DISK '/dev/tas/disk' NAME DS0 ATTRIBUTE 'AU_SIZE'='4M'; Add thread for node 2. $ tbboot $ tbsql sys/tibero SQL> alter diskspace DS0 add thread 1;
Proceed with recovery using tbrmgr
If the .passwd file is lost, add the parameter _MOUNT_MODE_WITHOUT_PASSWD_FILE=Y to the .tip file of tac and then proceed with recovery.
Alternatively, if you have previously backed up the .passwd file using rmgr, you can use that backup for recovery.
- Execute tbrmgr recover $ tbrmgr recover --with-archivelog -o /db/backup .============================================================================= .= Recovery Manager(RMGR) starts = .= = .= TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. = .============================================================================== RMGR '-o' option used : restoring from /db/backup .============================================================================== RMGR - recovery (WITH ARCHIVELOG) .============================================================================== -- Omitted -- Control file #0 (+DS0/tac/c1.ctl) is accessible Control file #1 (+DS0/tac/c2.ctl) is accessible -- Omitted -- TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. Tibero instance started up (MOUNT mode). Initializing the restore progress, it may take few minutes... RMGR begins restoring backup files. Full backup set_id: 1 Last incremental backup set_id: 1 RESTORE (set_id: 1, ts_id: 0, df_id: 0) - FULL BACKUP 100.0% |===============================| 38400/38400 blks 7.17s Synchronizing... RESTORE (set_id: 1, ts_id: 1, df_id: 1) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 2.06s Synchronizing... RESTORE (set_id: 1, ts_id: 3, df_id: 2) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 2.07s Synchronizing... RESTORE (set_id: 1, ts_id: 4, df_id: 3) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 2.08s Synchronizing... RESTORE (set_id: 1, ts_id: 5, df_id: 4) - FULL BACKUP 100.0% |===============================| 38400/38400 blks 8.15s Synchronizing... Settling... Restoring logfiles... Archivelog log-tac1-t0-r60875-s3.arc (thread: 0, set_id: 1, low_tsn: 65535, next_tsn: 65594) restored Archivelog log-tac1-t1-r60875-s3.arc (thread: 1, set_id: 1, low_tsn: 65535, next_tsn: 65594) restored Archive logfiles restoration succeeded Database restoration succeeded Given recovery point: COMPLETE RECOVERY Recoverable point using only backup archivelogs: change 65593 recoverSQL: ALTER DATABASE RECOVER AUTOMATIC RMGR Error: recovery failed (automatic recovery failed) SVR Error: Need log file (thread 0 seq -1) to recover from TSN 65594. Recovery done until 2024/06/26 16:34:52 TSN 65589. Recovery is incomplete and resetlogs is required. RMGR Server Error: -1147
Start with resetlogs
$ tbdown $ tbboot resetlogs
Normal startup and data verification
- Start both tac node1 and node2 $ tbboot $ tbsql tibero/tmax SQL> select count() from t1; COUNT() –––––––– 20