Tags: archivelogs, backedup, backup, backups, backupset, catalog, database, deletes, iam, mysql, oracle, restore, rman, script, sql
How to restore archivelogs from rman backupset
I do my daily backups with rman using catalog and backup script also deletes these archivelogs as they are backedup. Now iam in need of 15 days old archivelogs. But my rman catalog do not have the information that far.
How do i restore those specific old archivelogs from my old backupset?
Leave a comment...
- 14 Comments
- What makes you think that your catalog does not have the information?
Find the documentation:
Well anyhow here are somethings to try:
While logged into RMAN to check what archivelog files it knows about:
LIST BACKUP OF ARCHIVELOG
To restore do:
RESTORE ARCHIVELOG FROM SEQUENCE ? UNTIL SEQUENCE ?
}#2; Sun, 24 Feb 2008 00:13:00 GMT
- try running list backup of archivelog all completed after 'sysdate - 15' to see which archivelogs are available.#3; Sun, 24 Feb 2008 00:14:00 GMT
- What's your retention policy? Backupsets may be already marked as 'OBSOLETE'. Hopefully no 'delete obsolete' command has already removed these older backups.
Werner#4; Sun, 24 Feb 2008 00:15:00 GMT
- Hi All,
I forgot to mention one thing. After i backup to disk, I then write them to tapes.
In my rman catalog, retention policy is set to redundancy 2.
I connected to catalog and run List backup of archivelog all completed after 'sysdate-16'; This is listing only last 2 days backup information. I also tried
List backup of archivelog all; This is also listing only last 2 days info.
What i want is to restore old archivelogs from old backupsets, when the catalog info is not available.
Sharath#5; Sun, 24 Feb 2008 00:16:00 GMT
- I think you need to put all backupset from your tape to local hard drive. You need to ask you SA to do that for you. Once you have old backup on your machine then you can catalog that backup piece.
catalog backuppiece <new_file_name>;
Goto following link and read about BACKUPPIECE DESCRIPTION
~Keyur#6; Sun, 24 Feb 2008 00:17:00 GMT
- If he is doing daily incremental backups, why would you want archivelogs from 15 days ago?? Aren't they included in RMAN backup?? If he wants to restore from 15 days ago, he would need level 0 from time before that date, all incrementals, and archive logs for that period, if any....
Am I missing the point??#7; Sun, 24 Feb 2008 00:18:00 GMT
- Yes, you are missing the point. They don't want to restore the database just the archivelogs. The reason is only known to them at this time. Perhaps it has something to do with a transaction that occured during that time period that they want to capture using LOGMINER. Perhaps they have a standby database they want to apply the archivelogs to because it is out of sync. Perhaps they are doing a DR scenario. Who knows...but I think the steps have been covered.
1. Restore backup pieces to system from tape, location does not matter.
2. Catalog backupieces as outlined.
3. Restore archivelogs in normal manner.
Tim#8; Sun, 24 Feb 2008 00:19:00 GMT
- Thanks Keyur,
But do i need to connect to catalog before i run the catalog command?
Is there a way to catalog group of files at a time, without specifying each filename?
Sharath#9; Sun, 24 Feb 2008 00:20:00 GMT
I really appreciate your help.
In this scenario we are having a issue with our standby database. We found a archivelog gap and its out of sync now. We need just those files to fill in the gap.
Do i need to be connected to catalog when i run restore command for restoring archivelogs?
Sharath#10; Sun, 24 Feb 2008 00:21:00 GMT
- I believe that you do need to connect to the catalog, and I think that you have to do one file at a time.
If you are on unix use some system commands to create a file with these commands.
Like in UNIX
will give you the files where they are stored.
to edit text and add the syntax to either side of the file name.
Tim#11; Sun, 24 Feb 2008 00:22:00 GMT
- ok If that's a problem than I would explain it little bit different.
From Standby, find out which log is missing on standby database using following command.
SELECT * FROM V$ARCHIVE_GAP;
Once you decide what is missing, then ask your SA to restore missing gap from OS backup to any appropriate location. Once missing log files are on local hard drive,
1. start RMAN
2. Connect to primary (Make sure standby database is up and log apply service is on) and connect to database catalog, if you are using one.
3. then using catalog command, catalog backuppiece.
Answer for your question regarding cataloging all of files in director.
Cataloging Multiple Copies in a Directory: Example The following example catalogs a directory full of archived logs that were copied into the /tmp/arch_logs directory with an operating system utility:
CATALOG START WITH '/tmp/arch_logs';
Once, you catalog, your Log Apply Service will automatically pick it up and apply it to standby. Please send your outcome.
~Keyur#12; Sun, 24 Feb 2008 00:23:00 GMT
- Is there a way to find out which rman backup piece has which sequence archivelog files? Remember I am looking for really old files. I don't have this info in controlfiles or catalog.
And can i do the restore of archivelogs on the standby server instead of doing restore on primary server and then ftp archivelogs?
Sharath#13; Sun, 24 Feb 2008 00:24:00 GMT
- Everything we have said you can do, you can do on the standby server. You can restore the logs there from tape, catalog them to RMAN and then you can use RMAN and its tables/views to obtain the information you need.
I don't remember which views/tables will contain the information but you can look it up in the documentation for RMAN.
tim#14; Sun, 24 Feb 2008 00:25:00 GMT