You are attempting to restore a database to another server.
So, you have verified that you have controlfile and datafile backups on the source server :
RMAN> list backup of controlfile; using target database control file instead of recovery catalog List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 51 Full 11.52M DISK 00:00:01 20-FEB-21 BP Key: 51 Status: AVAILABLE Compressed: NO Tag: TAG20210220T114245 Piece Name: /opt/oracle/FRA/HEMANT/autobackup/2021_02_20/o1_mf_s_1065008565_j3119p5t_.bkp Control File Included: Ckp SCN: 1093419 Ckp time: 20-FEB-21 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 55 Full 11.52M DISK 00:00:02 04-MAY-21 BP Key: 55 Status: AVAILABLE Compressed: NO Tag: TAG20210504T232054 Piece Name: /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703254_j92slr2m_.bkp Control File Included: Ckp SCN: 1126526 Ckp time: 04-MAY-21 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 56 Full 11.48M DISK 00:00:01 04-MAY-21 BP Key: 56 Status: AVAILABLE Compressed: NO Tag: TAG20210504T232851 Piece Name: /home/oracle/controlfile.bak Control File Included: Ckp SCN: 1126757 Ckp time: 04-MAY-21 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 57 Full 11.52M DISK 00:00:02 04-MAY-21 BP Key: 57 Status: AVAILABLE Compressed: NO Tag: TAG20210504T232853 Piece Name: /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703733_j92t1pow_.bkp Control File Included: Ckp SCN: 1126766 Ckp time: 04-MAY-21 RMAN>
You have copied the backups to the target, new, server and attempt to restore :
oracle19c>rman target / Recovery Manager: Release 19.0.0.0.0 - Production on Wed May 5 22:27:26 2021 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database (not started) RMAN> startup nomount; Oracle instance started Total System Global Area 1207958960 bytes Fixed Size 8895920 bytes Variable Size 318767104 bytes Database Buffers 872415232 bytes Redo Buffers 7880704 bytes RMAN> restore controlfile from '/home/oracle/controlfile.bak'; Starting restore at 05-MAY-21 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=20 device type=DISK RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/05/2021 22:27:47 RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece RMAN> RMAN> quit Recovery Manager complete. oracle19c>ls /home/oracle/controlfile.bak /home/oracle/controlfile.bak oracle19c>ls /opt/oracle/FRA/HEMANT/autobackup/2021_02_20/o1_mf_s_1065008565_j3119p5t_.bkp /opt/oracle/FRA/HEMANT/autobackup/2021_02_20/o1_mf_s_1065008565_j3119p5t_.bkp oracle19c>ls /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703254_j92slr2m_.bkp /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703254_j92slr2m_.bkp oracle19c>ls /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703733_j92t1pow_.bkp /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703733_j92t1pow_.bkp oracle19c>
So, why do you get the RMAN-06172 error ? All the controlfile backups, including the manual backup to /home/oracle/controlfile.bak and the three autobackups, one from February 2021 and two from 04-May-2021 are available.
oracle19c>oerr rman 6172 6172, 1, "no AUTOBACKUP found or specified handle is not a valid copy or piece" // *Cause: A restore could not proceed because no AUTOBACKUP was found or // specified handle is not a valid copy or backup piece. // In case of restore from AUTOBACKUP, it may be the case that a // backup exists, but it does not satisfy the criteria specified in // the user's restore operands. // In case of restore from handle, it may be the handle is not a // backup piece or control file copy. In may be that it does not // exist. // *Action: Modify AUTOBACKUP search criteria or verify the handle. oracle19c> oracle19c>ls -l /home/oracle/controlfile.bak -rw-r-----. 1 root root 12058624 May 4 23:28 /home/oracle/controlfile.bak oracle19c>ls -l /opt/oracle/FRA/HEMANT/autobackup/2021_02_20/o1_mf_s_1065008565_j3119p5t_.bkp -rw-r-----. 1 root root 12091392 Feb 20 11:42 /opt/oracle/FRA/HEMANT/autobackup/2021_02_20/o1_mf_s_1065008565_j3119p5t_.bkp oracle19c>ls -l /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703254_j92slr2m_.bkp -rw-r-----. 1 root root 12091392 May 4 23:20 /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703254_j92slr2m_.bkp oracle19c>ls -l /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703733_j92t1pow_.bkp -rw-r-----. 1 root root 12091392 May 4 23:28 /opt/oracle/FRA/HEMANT/autobackup/2021_05_04/o1_mf_s_1071703733_j92t1pow_.bkp oracle19c>
You get the "error" message that there are no AUTOBACKUPs because the "oracle19c" account is unable to actually *read* those pieces. It can list them using "ls" because it has permission to read the OS folders containing them, but it does no have permission to read the files owned by root without having granted read permission.
So, before you start wondering about your AUTOBACKUP configuration or search criteria specification like "RESTORE CONTROLFILE FROM AUTOBACKUP MAXDAYS 30", check if the backup pieces are readable.
No comments:
Post a Comment