Document Type | Technical Information
Category | Backup/Recovery
Applicable Product Version | 7FS02PS
Document Number | TBATI014
Overview
You can perform a restore operation on data files using the --restore-only option of tbrmgr.
This option is only available when the database is in mount mode.
Note-restore-onlyAfter fetching the target backup data files, recovery is not performed. It can be used in MOUNT or NORMAL mode, and in NORMAL mode, Offline tablespaces must be specified.
Method
This is an example of restore using tbrmgr.
1. Query Tablespaces
SQL> col DF_NAME format a40 SQL> col TS_NAME format a15 SQL> SELECT a.name as DF_NAME, b.name as TS_NAME, a.FILE#, b.TS# FROM v$datafile a INNER JOIN v$tablespace b ON a.TS#=b.TS# ; 2 3 4 DF_NAME TS_NAME FILE# TS# ---------------------------------------- --------------- ---------- ---------- +DS0/tac/system01/system01.dtf SYSTEM 0 0 +DS0/tac/system01/undo0_01.dtf UNDO0 1 1 +DS0/tac/system01/usr01.dtf USR 2 3 +DS0/tac/system01/tpr01.dtf SYSSUB 3 4 +DS0/tac/system02/undo1_01.dtf UNDO1 4 5 +DS0/tac/test1.dbf TEST1 5 6 +DS0/tac/test2.dbf TEST2 6 7 +DS0/tac/test3.dbf TEST3 7 8 8 rows selected.
2. Perform tbrmgr Backup and Induce Failure
[14:35]ASCMD +DS0/tac> rm test1.dbf Removing file: +DS0/tac/test1.dbf [14:35]ASCMD +DS0/tac> rm test2.dbf Removing file: +DS0/tac/test1.dbf [14:37]ASCMD +DS0/tac> rm test3.dbf Removing file: +DS0/tac/test3.dbf
3. Proceed with File Restore
$ cmrctl start db --name tac1 --option mount BOOT SUCCESS! (MODE : MOUNT) ** -T(--skip-tablespace) allows specifying tablespaces to exclude from restore $ tbrmgr recover --restore-only -o /db/backup -T test1,test3 ============================================================================== = Recovery Manager(RMGR) starts = = = = TmaxTibero Corporation Copyright (c) 2020-. All rights reserved. = ============================================================================== archive log check succeeded RMGR '-o' option used : restoring from /db/backup ============================================================================== RMGR - recovery (RESTORE ONLY) ============================================================================== 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 1.05s Synchronizing... RESTORE (set_id: 1, ts_id: 1, df_id: 1) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 0.00s Synchronizing... RESTORE (set_id: 1, ts_id: 3, df_id: 2) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 0.00s Synchronizing... RESTORE (set_id: 1, ts_id: 4, df_id: 3) - FULL BACKUP 100.0% |===============================| 12800/12800 blks 1.03s Synchronizing... RESTORE (set_id: 1, ts_id: 5, df_id: 4) - FULL BACKUP 100.0% |===============================| 38400/38400 blks 2.08s Synchronizing... RESTORE (set_id: 1, ts_id: 7, df_id: 6) - FULL BACKUP #-- Only test2 is restored excluding test1 and test3 100.0% |===============================| 6400/6400 blks 0.00s Synchronizing... Settling... Database restoration succeeded #-- Recovery is not performed after restore RMGR recovery ends