How to restore archive logs from RMAN backup

To restore the archive logs from RMAN backup, we need to reset the default location of archivelogs otherwise RMAN restores it’s on the default location, to change archivelogs location we used the SET ARCHIVELOG DESTINATION command.

Steps to restore archive logs from RMAN backup

  1. Your Database must be in mounted open or open mode.
  2. start RMAN and connect with the target database.
  3. Execute the below steps in the RUN command.
SQL> select open_mode from v$database;
 
open_mode
--------------
READ WRITE

SQL> exit

Now start RMAN and connect with the target database.

$rman target/

In this example, we are going to restore only 10 archive logs from logseq 200 to logseq 210.

RMAN> RUN {
              #New location for archive logs.
              set archivelog destination to '/u01/arc_restore';
              #Restore archive logs as per sequence number.
              restore archivelog from logseq 200 until logseq 210;
              }

from logseq – Is the starting log sequence#
until logseq – Is the end log sequence#

If you want to restore all archivelogs from backup use below command.

RMAN> restore archivelog all;

To restore a single archive log, suppose I want to restore log number 215.

RMAN> restore archivelog from logseq=215;

How to uncatalog the required archive logs from the RMAN prompt?

Using below command you can uncatalog the required archivelogs from the RMAN prompt.

RMAN>change archivelog from logseq=60 until logseq=80 uncatalog;

Read – Storing RMAN output in a logfile

Connect with me on:

Instagram: https://www.instagram.com/shripaldba
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube: 
https://www.youtube.com/ocptechnology

2 thoughts on “How to restore archive logs from RMAN backup”

Leave a Comment

%d bloggers like this: