-
RMAN Restore from Old Tape Backup
I have a production database(9.2.0.3). that is backed up using RMAN nocatalog. The user want me to take a backup off of tape from June 21st and recreate in development (different directory structure). I can't seem to be able to find exactly how to do that. Can anyone give me a link?
rman target=/ << EOF >>${shlog} 2>&1
RUN {
shutdown immediate
startup mount
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$BKUPDIR/cf_%d_%F';
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '$BKUPDIR/df_%d_%Y%M%D_%s';
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
# Back up all critical tablespaces using Incremental Level 0 - Cumulative.
BACKUP INCREMENTAL LEVEL 0 CUMULATIVE
(
DATABASE
);
# Back up all archived redo logs that have not yet been backed up
# at least twice to the same device
BACKUP ARCHIVELOG ALL
NOT BACKED UP 2 TIMES;
# Delete all archived redo logs that have already been backed up at least twice
# to the same device
DELETE NOPROMPT ARCHIVELOG ALL
BACKED UP 2 TIMES
TO DEVICE TYPE DISK;
DELETE NOPROMPT OBSOLETE REDUNDANCY 2;
}
alter database open;
list backup summary;
EXIT;
-
1) Restore all June 21st backup files to disk.
2) Restore the controlfile from June 21st backup.
3) Restore database.
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
I restored control file
I got the controlfile restored.
I renamed the datafiles using setname
I renamed the log files
Now I am having as problem when it tries to do the restore. It is looking for the backupset in the production backup directory instead of where I have it on development.
How do I tell it to go to this other directory to find the backupset?
Thanks
-
-
Not sure if you can achieve that. The problem is that into the control file, the backupset is described, with its tag, its contents and.... its backup pieces with their path. Now when u try to restore, it finds out the backupset to restore from and its backup pieces
Can you reproduce the same directory structure on the dev machine using say links?
Regards
-
You can use catalog backuppiece and update RMAn for the new location of backupsets.
-
aradhana Arora
are you sure that works with 9i? I think that appeared in 10g
-
10g Command
That, I believe is a 10G command. It is not working since this is 9.2.0.3.
I tried to tell the channel where to look with the format command but it did not work.
ALLOCATE CHANNEL c1 TYPE DISK FORMAT '/uatdb03/bkp/FXUSPD01/coldbackup/df_%d_%Y%M%D_%s';
-
I am afraid in this way you are telling where the channel to write, not where to read from.
It finds that in the control file and I am afraid there is no way to change it
Maybe you can try the following
At the source, make a directory on the disk and backup the backuset to that directory ( I think that should work in 9i as well)
At the destination, make the same directory, copy the backup pieces there and restore from them ( of course you will need the control file from after the backup backupset)
-
That Worked
I did that and it worked thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|