일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- ORACLE19C
- 오라클
- ogg
- linux
- Database
- 데이터가드
- ActiveDataGuard
- 데이터베이스
- DataGuard
- 디비투
- 백업
- 오라클아키텍쳐
- 오라클구조
- 오지지
- Installation
- goldengate
- SILENTMODE
- 19c
- oracle recovery
- oracle goldengate
- Oracle
- recovery
- 오라클설치
- SSH
- Oracle 19c
- rman
- OracleGoldenGate
- adg
- oracle installation
- backup
- Today
- Total
DoubleDBDeep
[Oracle] RMAN Recovery Database 본문
[ORACLE] RMAN Incremental backup 및 확인
[ORACLE] RMAN Incremental backup 및 확인
증분백업에 대해서 .. lv0 = 처음 전체 백업 / lv1= lv0 대비 바뀐것만 백업lv0 백업#!/bin/bashexport ORACLE_SID=wintrgexport ORACLE_UNQNAME=wintrgexport ORACLE_UNQNAME_LOWER=`echo $ORACLE_UNQNAME | tr A-Z a-z`export EDITOR=viexport LANG
devcami.tistory.com
여기서받은 백업본으로 다른 서버에 DB 복구해보겠다
DB 복구과정은
1. PFILE / SPFILE 로 NOMOUNT
2. CONTROLFILE 백업셋으로 컨트롤파일 RESTORE
3. RESTORE된 CONTROLFILE로 DATABASE MOUNT
4. RMAN 접속해서 백업셋으로 데이터파일 RESTORE
5. temp, bct, logfile , controlfile, datafile 확인 및 rename
6. recovery
7. open
이 백업본들 다 들고 다른서버 ㄱㄱ
19c 엔진을 가진 새 서버에서
pfile
*.audit_file_dest='/u01/app/oracle/admin/wintrg/adump'
*.audit_trail='db'
*.compatible='19.0.0'
*.control_files='/home/oracle/oradata/control01.ctl'
*.db_block_size=8192
*.db_name='wintrg'
*.db_recovery_file_dest='/home/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=7851m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=wintrgXDB)'
*.log_archive_format='%t_%s_%r.dbf'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=996m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=2986m
*.tde_configuration='KEYSTORE_CONFIGURATION=FILE'
*.undo_tablespace='UNDOTBS1'
*.wallet_root='/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin/wallet/wintrg'
*.db_create_file_dest='/home/oracle/oradata'
[target@oracle:/media/sf_01.oracle/9.backup]> ls -alrt
total 17496220
drwxrwx---. 1 root vboxsf 4096 Apr 15 08:40 ..
-rwxrwx---. 1 root vboxsf 10977280 Apr 15 08:40 wintrg_0l3murfd_21_1_1
-rwxrwx---. 1 root vboxsf 114688 Apr 15 08:40 wintrg_0k3murfb_20_1_1
-rwxrwx---. 1 root vboxsf 4096 Apr 15 08:40 wintrg_0j3murfa_19_1_1
-rwxrwx---. 1 root vboxsf 208342528 Apr 15 08:41 wintrg_0i3murf7_18_1_1
-rwxrwx---. 1 root vboxsf 398468608 Apr 15 08:41 wintrg_0h3murf7_17_1_1
-rwxrwx---. 1 root vboxsf 6455197696 Apr 15 08:56 wintrg_0f3murda_15_1_1
-rwxrwx---. 1 root vboxsf 10137477120 Apr 15 09:17 wintrg_0e3murda_14_1_1
-rwxrwx---. 1 root vboxsf 10682368 Apr 15 09:17 wintrg_0b3msmbc_11_1_1
-rwxrwx---. 1 root vboxsf 194871296 Apr 15 09:18 wintrg_093msmam_9_1_1
-rwxrwx---. 1 root vboxsf 499982336 Apr 15 09:19 wintrg_083msmam_8_1_1
drwxrwx---. 1 root vboxsf 4096 Apr 15 09:29 .
pfile로 nomount
SQL> startup pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initwintrg.ora';
컨트롤 파일 restore
RMAN> restore controlfile from '/media/sf_01.oracle/9.backup/wintrg_0l3murfd_21_1_1';
restore controlfile from '/media/sf_01.oracle/9.backup/wintrg_0l3murfd_21_1_1';
Starting restore at 2025/04/15 09:32:59
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=237 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/oradata/control01.ctl
Finished restore at 2025/04/15 09:33:01
db mount
RMAN> alter database mount ;
alter database mount ;
released channel: ORA_DISK_1
Statement processed
백업셋 카탈로깅
RMAN> catalog start with '/media/sf_01.oracle/9.backup' ;
catalog start with '/media/sf_01.oracle/9.backup' ;
Starting implicit crosscheck backup at 2025/04/15 09:34:50
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 2025/04/15 09:34:52
Starting implicit crosscheck copy at 2025/04/15 09:34:52
using channel ORA_DISK_1
Finished implicit crosscheck copy at 2025/04/15 09:34:52
searching for all files in the recovery area
cataloging files...
no files cataloged
searching for all files that match the pattern /media/sf_01.oracle/9.backup
List of Files Unknown to the Database
=====================================
File Name: /media/sf_01.oracle/9.backup/wintrg_083msmam_8_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_093msmam_9_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0b3msmbc_11_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0h3murf7_17_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0i3murf7_18_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0j3murfa_19_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0k3murfb_20_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0l3murfd_21_1_1
Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /media/sf_01.oracle/9.backup/wintrg_083msmam_8_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_093msmam_9_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0b3msmbc_11_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0h3murf7_17_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0i3murf7_18_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0j3murfa_19_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0k3murfb_20_1_1
File Name: /media/sf_01.oracle/9.backup/wintrg_0l3murfd_21_1_1
LIST BACKUP 확인
RMAN> LIST BACKUP ;
LIST BACKUP ;
List of Backup Sets
===================
BS Key Type LV Size
------- ---- -- ----------
3 Incr 0 185.84M
List of Datafiles in backup set 3
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
2 0 Incr 687844 2025/04/14 12:49:26 NO /u01/app/oracle/oradata/WINTRG/sysaux01.dbf
4 0 Incr 687844 2025/04/14 12:49:26 NO /u01/app/oracle/oradata/WINTRG/users01.dbf
Backup Set Copy #1 of backup set 3
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:04 2025/04/14 12:49:30 NO L0
List of Backup Pieces for backup set 3 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
3 1 EXPIRED /u01/backup/wintrg_093msmam_9_1_1
Backup Set Copy #2 of backup set 3
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:04 2025/04/14 12:49:30 NO L0
List of Backup Pieces for backup set 3 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
17 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_093msmam_9_1_1
BS Key Type LV Size
------- ---- -- ----------
4 Incr 0 476.81M
List of Datafiles in backup set 4
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
1 0 Incr 687842 2025/04/14 12:49:26 NO /u01/app/oracle/oradata/WINTRG/system01.dbf
3 0 Incr 687842 2025/04/14 12:49:26 NO /u01/app/oracle/oradata/WINTRG/undotbs01.dbf
Backup Set Copy #1 of backup set 4
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:11 2025/04/14 12:49:38 NO L0
List of Backup Pieces for backup set 4 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
4 1 EXPIRED /u01/backup/wintrg_083msmam_8_1_1
Backup Set Copy #2 of backup set 4
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:11 2025/04/14 12:49:37 NO L0
List of Backup Pieces for backup set 4 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
16 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_083msmam_8_1_1
BS Key Type LV Size
------- ---- -- ----------
6 Full 10.17M
Control File Included: Ckp SCN: 687922 Ckp time: 2025/04/14 12:49:48
Backup Set Copy #1 of backup set 6
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:02 2025/04/14 12:49:50 NO CONTROLFILE
List of Backup Pieces for backup set 6 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
6 1 EXPIRED /u01/backup/wintrg_0b3msmbc_11_1_1
Backup Set Copy #2 of backup set 6
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:02 2025/04/14 12:49:50 NO CONTROLFILE
List of Backup Pieces for backup set 6 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
18 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0b3msmbc_11_1_1
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
7 Full 10.20M DISK 00:00:00 2025/04/14 12:49:51
BP Key: 7 Status: EXPIRED Compressed: NO Tag: TAG20250414T124951
Piece Name: /u01/app/oracle/fast_recovery_area/WINTRG/autobackup/2025_04_14/o1_mf_s_1198414191_mzs1gzbf_.bkp
SPFILE Included: Modification time: 2025/04/14 10:53:50
SPFILE db_unique_name: WINTRG
Control File Included: Ckp SCN: 687932 Ckp time: 2025/04/14 12:49:51
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
8 Full 10.20M DISK 00:00:01 2025/04/14 13:32:53
BP Key: 8 Status: EXPIRED Compressed: NO Tag: TAG20250414T133252
Piece Name: /u01/app/oracle/fast_recovery_area/WINTRG/autobackup/2025_04_14/o1_mf_s_1198416772_mzs3zo88_.bkp
SPFILE Included: Modification time: 2025/04/14 13:22:57
SPFILE db_unique_name: WINTRG
Control File Included: Ckp SCN: 698533 Ckp time: 2025/04/14 13:32:52
BS Key Type LV Size
------- ---- -- ----------
9 Incr 1 6.01G
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
1 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/system01.dbf
2 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/sysaux01.dbf
7 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/HIS_I08_01.dbf
9 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/PAM_I08_01.dbf
10 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/EMR_D08_01.dbf
11 1 Incr 944769 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/EMR_I08_01.dbf
Backup Set Copy #1 of backup set 9
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:44 2025/04/15 08:29:11 NO L1
List of Backup Pieces for backup set 9 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
9 1 EXPIRED /u01/backup/wintrg_0f3murda_15_1_1
Backup Set Copy #2 of backup set 9
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:44 2025/04/15 08:29:10 NO L1
List of Backup Pieces for backup set 9 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
20 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1
BS Key Type LV Size
------- ---- -- ----------
10 Incr 1 9.44G
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
3 1 Incr 944767 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/undotbs01.dbf
4 1 Incr 944767 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/users01.dbf
5 1 Incr 944767 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/SEC_D08_01.dbf
6 1 Incr 944767 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/HIS_D08_01.dbf
8 1 Incr 944767 2025/04/15 08:28:26 NO /u01/app/oracle/oradata/WINTRG/PAM_D08_01.dbf
Backup Set Copy #1 of backup set 10
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:53 2025/04/15 08:29:20 NO L1
List of Backup Pieces for backup set 10 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
10 1 EXPIRED /u01/backup/wintrg_0e3murda_14_1_1
Backup Set Copy #2 of backup set 10
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:53 2025/04/15 08:29:19 NO L1
List of Backup Pieces for backup set 10 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
19 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
11 Full 10.48M DISK 00:00:00 2025/04/15 08:29:22
BP Key: 11 Status: EXPIRED Compressed: NO Tag: TAG20250415T082922
Piece Name: /u01/app/oracle/fast_recovery_area/WINTRG/autobackup/2025_04_15/o1_mf_s_1198484962_mzv6llck_.bkp
SPFILE Included: Modification time: 2025/04/15 08:27:58
SPFILE db_unique_name: WINTRG
Control File Included: Ckp SCN: 944849 Ckp time: 2025/04/15 08:29:22
BS Key Size
------- ----------
12 198.69M
List of Archived Logs in backup set 12
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 57 712029 2025/04/14 13:46:56 713592 2025/04/14 14:39:18
1 60 940675 2025/04/15 07:53:24 944875 2025/04/15 08:29:24
1 61 944875 2025/04/15 08:29:24 944888 2025/04/15 08:29:24
1 62 944888 2025/04/15 08:29:24 944901 2025/04/15 08:29:26
Backup Set Copy #1 of backup set 12
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:01 2025/04/15 08:29:28 NO TAG20250415T082926
List of Backup Pieces for backup set 12 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
12 1 EXPIRED /u01/backup/wintrg_0i3murf7_18_1_1
Backup Set Copy #2 of backup set 12
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:01 2025/04/15 08:29:28 NO TAG20250415T082926
List of Backup Pieces for backup set 12 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
22 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0i3murf7_18_1_1
BS Key Size
------- ----------
13 380.01M
List of Archived Logs in backup set 13
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 55 711775 2025/04/14 13:46:31 711916 2025/04/14 13:46:43
1 56 711916 2025/04/14 13:46:43 712029 2025/04/14 13:46:56
Backup Set Copy #1 of backup set 13
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:01 2025/04/15 08:29:29 NO TAG20250415T082926
List of Backup Pieces for backup set 13 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
13 1 EXPIRED /u01/backup/wintrg_0h3murf7_17_1_1
Backup Set Copy #2 of backup set 13
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:01 2025/04/15 08:29:28 NO TAG20250415T082926
List of Backup Pieces for backup set 13 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
21 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0h3murf7_17_1_1
BS Key Size
------- ----------
14 3.50K
List of Archived Logs in backup set 14
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 63 944901 2025/04/15 08:29:26 944910 2025/04/15 08:29:26
Backup Set Copy #1 of backup set 14
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:00 2025/04/15 08:29:30 NO TAG20250415T082926
List of Backup Pieces for backup set 14 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
14 1 EXPIRED /u01/backup/wintrg_0j3murfa_19_1_1
Backup Set Copy #2 of backup set 14
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:00 2025/04/15 08:29:30 NO TAG20250415T082926
List of Backup Pieces for backup set 14 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
23 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0j3murfa_19_1_1
BS Key Type LV Size
------- ---- -- ----------
15 Full 96.00K
SPFILE Included: Modification time: 2025/04/15 08:27:58
SPFILE db_unique_name: WINTRG
Backup Set Copy #1 of backup set 15
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:00 2025/04/15 08:29:31 NO SPFILE
List of Backup Pieces for backup set 15 Copy #1
BP Key Pc# Status Piece Name
------- --- ----------- ----------
15 1 EXPIRED /u01/backup/wintrg_0k3murfb_20_1_1
Backup Set Copy #2 of backup set 15
Device Type Elapsed Time Completion Time Compressed Tag
----------- ------------ ------------------- ---------- ---
DISK 00:00:00 2025/04/15 08:29:31 NO SPFILE
List of Backup Pieces for backup set 15 Copy #2
BP Key Pc# Status Piece Name
------- --- ----------- ----------
24 1 AVAILABLE /media/sf_01.oracle/9.backup/wintrg_0k3murfb_20_1_1
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
16 Full 10.45M DISK 00:00:01 2025/04/15 08:29:34
BP Key: 25 Status: AVAILABLE Compressed: NO Tag: CONTROLFILE
Piece Name: /media/sf_01.oracle/9.backup/wintrg_0l3murfd_21_1_1
Control File Included: Ckp SCN: 944958 Ckp time: 2025/04/15 08:29:33
DATAFILE RESTORE
export TMOUT=0
export ORACLE_SID=wintrg
export ORACLE_UNQNAME=wintrg
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
export DT=`date +%Y%m%d%H%M`
/u01/app/oracle/product/19.0.0.0/dbhome_1/bin/rman target / log /u01/backup/log/${ORACLE_SID}_restore_${DT}.log << EOF
run
{
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
SET NEWNAME FOR DATABASE TO NEW ;
restore database ;
switch datafile all;
switch tempfile all;
}
EOF
생김
[target@oracle:/home/oracle/oradata/WINTRG]> cd datafile/
[target@oracle:/home/oracle/oradata/WINTRG/datafile]> ls -alrt
total 2395184
drwxr-x---. 3 oracle oinstall 22 Apr 15 09:38 ..
drwxr-x---. 2 oracle oinstall 4096 Apr 15 09:38 .
-rw-r-----. 1 oracle oinstall 5251072 Apr 15 09:38 o1_mf_users_mzvbnfql_.dbf
-rw-r-----. 1 oracle oinstall 10493952 Apr 15 09:38 o1_mf_his_d08__mzvbnfwj_.dbf
-rw-r-----. 1 oracle oinstall 10493952 Apr 15 09:38 o1_mf_pam_d08__mzvbnfxh_.dbf
-rw-r-----. 1 oracle oinstall 230694912 Apr 15 09:38 o1_mf_undotbs1_mzvbnfqh_.dbf
-rw-r-----. 1 oracle oinstall 576724992 Apr 15 09:38 o1_mf_sysaux_mzvbnflt_.dbf
-rw-r-----. 1 oracle oinstall 4294975488 Apr 15 09:39 o1_mf_emr_d08__mzvbnfqz_.dbf
-rw-r-----. 1 oracle oinstall 2147491840 Apr 15 09:39 o1_mf_pam_i08__mzvbnfsw_.dbf
-rw-r-----. 1 oracle oinstall 10737426432 Apr 15 09:39 o1_mf_sec_d08__mzvbnfv8_.dbf
-rw-r-----. 1 oracle oinstall 2147491840 Apr 15 09:39 o1_mf_emr_i08__mzvbnfwb_.dbf
-rw-r-----. 1 oracle oinstall 734011392 Apr 15 09:39 o1_mf_system_mzvbnfm4_.dbf
-rw-r-----. 1 oracle oinstall 1073750016 Apr 15 09:39 o1_mf_his_i08__mzvbnfxf_.dbf
로그
[wintrg@oracle:/home/oracle/backup/log]> cat wintrg_restore_202504150938.log
Recovery Manager: Release 19.0.0.0.0 - Production on Tue Apr 15 09:38:32 2025
Version 19.26.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: WINTRG (DBID=516464620, not open)
RMAN> run
2> {
3> CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
4> SET NEWNAME FOR DATABASE TO NEW ;
5> restore database ;
6> switch datafile all;
7> switch tempfile all;
8> }
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
executing command: SET NEWNAME
Starting restore at 2025/04/15 09:38:34
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=19 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=259 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=20 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /home/oracle/oradata/WINTRG/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_DISK_1: restoring datafile 00004 to /home/oracle/oradata/WINTRG/datafile/o1_mf_users_%u_.dbf
channel ORA_DISK_1: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_093msmam_9_1_1
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00001 to /home/oracle/oradata/WINTRG/datafile/o1_mf_system_%u_.dbf
channel ORA_DISK_2: restoring datafile 00003 to /home/oracle/oradata/WINTRG/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_DISK_2: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_083msmam_8_1_1
channel ORA_DISK_3: starting datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_DISK_3: restoring datafile 00007 to /home/oracle/oradata/WINTRG/datafile/o1_mf_his_i08__%u_.dbf
channel ORA_DISK_3: restoring datafile 00009 to /home/oracle/oradata/WINTRG/datafile/o1_mf_pam_i08__%u_.dbf
channel ORA_DISK_3: restoring datafile 00010 to /home/oracle/oradata/WINTRG/datafile/o1_mf_emr_d08__%u_.dbf
channel ORA_DISK_3: restoring datafile 00011 to /home/oracle/oradata/WINTRG/datafile/o1_mf_emr_i08__%u_.dbf
channel ORA_DISK_3: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1
channel ORA_DISK_4: starting datafile backup set restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
channel ORA_DISK_4: restoring datafile 00005 to /home/oracle/oradata/WINTRG/datafile/o1_mf_sec_d08__%u_.dbf
channel ORA_DISK_4: restoring datafile 00006 to /home/oracle/oradata/WINTRG/datafile/o1_mf_his_d08__%u_.dbf
channel ORA_DISK_4: restoring datafile 00008 to /home/oracle/oradata/WINTRG/datafile/o1_mf_pam_d08__%u_.dbf
channel ORA_DISK_4: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1
channel ORA_DISK_1: piece handle=/media/sf_01.oracle/9.backup/wintrg_093msmam_9_1_1 tag=L0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
channel ORA_DISK_2: piece handle=/media/sf_01.oracle/9.backup/wintrg_083msmam_8_1_1 tag=L0
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:36
파일 확인
SQL> col name for a200
select name from v$tempfile ;
select member from v$logfile;
select NAME from v$datafile ;
select name from v$controlfile ;
SQL>
NAME
--------------------------------------------------------------------------------
/home/oracle/oradata/WINTRG/datafile/o1_mf_temp_%u_.tmp
SQL>
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/WINTRG/redo01.log
/u01/app/oracle/oradata/WINTRG/redo02.log
/u01/app/oracle/oradata/WINTRG/redo03.log
SQL>
NAME
--------------------------------------------------------------------------------
/home/oracle/oradata/WINTRG/datafile/o1_mf_system_mzvbnfm4_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_sysaux_mzvbnflt_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_undotbs1_mzvbnfqh_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_users_mzvbnfql_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_sec_d08__mzvbnfv8_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_his_d08__mzvbnfwj_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_his_i08__mzvbnfxf_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_pam_d08__mzvbnfxh_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_pam_i08__mzvbnfsw_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_emr_d08__mzvbnfqz_.dbf
/home/oracle/oradata/WINTRG/datafile/o1_mf_emr_i08__mzvbnfwb_.dbf
11 rows selected.
SQL>
NAME
--------------------------------------------------------------------------------
/home/oracle/oradata/control01.ctl
alter database rename file '/u01/app/oracle/oradata/WINTRG/redo01.log' to '/home/oracle/oradata/WINTRG/onlinelog/redo01.log';
alter database rename file '/u01/app/oracle/oradata/WINTRG/redo02.log' to '/home/oracle/oradata/WINTRG/onlinelog/redo02.log';
alter database rename file '/u01/app/oracle/oradata/WINTRG/redo03.log' to '/home/oracle/oradata/WINTRG/onlinelog/redo03.log';
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/home/oracle/oradata/WINTRG/onlinelog/redo01.log
/home/oracle/oradata/WINTRG/onlinelog/redo02.log
/home/oracle/oradata/WINTRG/onlinelog/redo03.log
Recover
[wintrg@oracle:/home/oracle/backup/log]> rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Tue Apr 15 09:43:24 2025
Version 19.26.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: WINTRG (DBID=516464620, not open)
RMAN> recover database ;
recover database ;
Starting recover at 2025/04/15 09:43:29
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=262 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=26 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=260 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /home/oracle/oradata/WINTRG/datafile/o1_mf_system_mzvbnfm4_.dbf
destination for restore of datafile 00002: /home/oracle/oradata/WINTRG/datafile/o1_mf_sysaux_mzvbnflt_.dbf
channel ORA_DISK_1: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1
channel ORA_DISK_2: starting incremental datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: /home/oracle/oradata/WINTRG/datafile/o1_mf_undotbs1_mzvbnfqh_.dbf
destination for restore of datafile 00004: /home/oracle/oradata/WINTRG/datafile/o1_mf_users_mzvbnfql_.dbf
channel ORA_DISK_2: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1
channel ORA_DISK_2: piece handle=/media/sf_01.oracle/9.backup/wintrg_0e3murda_14_1_1 tag=L1
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: piece handle=/media/sf_01.oracle/9.backup/wintrg_0f3murda_15_1_1 tag=L1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=60
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=61
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=62
channel ORA_DISK_1: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0i3murf7_18_1_1
channel ORA_DISK_2: starting archived log restore to default destination
channel ORA_DISK_2: restoring archived log
archived log thread=1 sequence=63
channel ORA_DISK_2: reading from backup piece /media/sf_01.oracle/9.backup/wintrg_0j3murfa_19_1_1
channel ORA_DISK_1: piece handle=/media/sf_01.oracle/9.backup/wintrg_0i3murf7_18_1_1 tag=TAG20250415T082926
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_60_mzvby4n4_.arc thread=1 sequence=60
channel default: deleting archived log(s)
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_60_mzvby4n4_.arc RECID=59 STAMP=1198489428
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_61_mzvby4q3_.arc thread=1 sequence=61
channel default: deleting archived log(s)
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_61_mzvby4q3_.arc RECID=57 STAMP=1198489428
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_62_mzvby4ok_.arc thread=1 sequence=62
channel default: deleting archived log(s)
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_62_mzvby4ok_.arc RECID=58 STAMP=1198489428
channel ORA_DISK_2: piece handle=/media/sf_01.oracle/9.backup/wintrg_0j3murfa_19_1_1 tag=TAG20250415T082926
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:02
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_63_mzvby4ny_.arc thread=1 sequence=63
channel default: deleting archived log(s)
archived log file name=/home/oracle/fast_recovery_area/WINTRG/archivelog/2025_04_15/o1_mf_1_63_mzvby4ny_.arc RECID=56 STAMP=1198489428
unable to find archived log
archived log thread=1 sequence=64
RMAN Command Id : 2025-04-15T09:43:24
RMAN Command Id : 2025-04-15T09:43:24
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/15/2025 09:43:51
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 64 and starting SCN of 944910
19.26 엔진에서 19.22 버전을 복구했더니 오픈은 됐는데 아래 메세지가 뜸
RMAN> alter database open resetlogs;
alter database open resetlogs;
Statement processed
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.22.00.00 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 19.22.00.00 in TARGET database is not current
아래 커맨드 진행
SQL> @$ORACLE_HOME/rdbms/admin/dbmsrman.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtrmns.plb
SQL> @$ORACLE_HOME/rdbms/admin/dbmsbkrs.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtbkrs.plb
복구완료~
인크리멘탈 백업 받은 데이터도 보이는지 확인
'ORACLE > Backup & Recovery' 카테고리의 다른 글
[ORACLE] RMAN Incremental backup 및 확인 (0) | 2025.04.15 |
---|---|
[ORACLE] RMAN FULLBACKUP Shell Script (0) | 2023.12.09 |
[ORACLE] RMAN 및 백업 관련 동적 View (0) | 2023.05.04 |
[ORACLE] RMAN Duplicate | Oracle 19c RAC 환경 Database 복제 (0) | 2023.05.04 |