Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to restore RMAN Backup level 0 + incremental?

Beauty_and_dBestMay 3 2017 — edited May 17 2017

Hi ALL,

11gR2

OL6

We have the following RMAN backup scripts

1. Level 0 > run on Sundays

2. Incremental > run on Mondays to Saturdays

======================

Level 0 Backup Script:

======================

# Identify the backup location

export BACKUP_DIR=/oracle/RMAN_Backup

# Source the environment file, if any

. /oracle/PROD/db/tech_st/11.2.0/PROD_ebizdb.env

# Clean out older backups. Delete all backups older than 10 days

#find $BACKUP_DIR/* -mtime +10 ! -wholename $BACKUP_DIR/ -delete

# Clean out older backups. Delete all backups older than 10 days

find $BACKUP_DIR/* -mtime +7 ! -wholename $BACKUP_DIR/ -delete

# Create Directory for the new day's backup

date

mkdir $BACKUP_DIR/`date +%F`

export BACKUP_DIR=$BACKUP_DIR/`date +%F`

export LOGFILE=${BACKUP_DIR}/LogRMAN

# Run the RMAN backup script and spool the output

rman target / nocatalog log=$LOGFILE << EOF

run {

allocate channel ch1 type disk format='$BACKUP_DIR/FPPC_PROD_full_%d_%t_s%s_s%p_CtlFile.bkp';

set limit channel ch1 kbytes=2000000;

backup current controlfile;

release channel ch1;

allocate channel ch1 type disk format='$BACKUP_DIR/FPPC_PROD_full_%t_s%s_s%p_DB.bkp';

allocate channel ch2 type disk format='$BACKUP_DIR/FPPC_PROD_full_%t_s%s_s%p_DB.bkp';

allocate channel ch3 type disk format='$BACKUP_DIR/FPPC_PROD_full_%t_s%s_s%p_DB.bkp';

allocate channel ch4 type disk format='$BACKUP_DIR/FPPC_PROD_full_%t_s%s_s%p_DB.bkp';

set limit channel ch1 kbytes=2000000;

set limit channel ch2 kbytes=2000000;

set limit channel ch3 kbytes=2000000;

set limit channel ch4 kbytes=2000000;

backup full filesperset 4 (database include current controlfile);

release channel ch1;

release channel ch2;

release channel ch3;

release channel ch4;

allocate channel ch1 type disk format='$BACKUP_DIR/FPPC_PROD_full_%d_%t_s%s_s%p_ArcLog.bkp';

allocate channel ch2 type disk format='$BACKUP_DIR/FPPC_PROD_full_%d_%t_s%s_s%p_ArcLog.bkp';

set limit channel ch1 kbytes=4000000;

set limit channel ch2 kbytes=4000000;

backup archivelog all filesperset 2;

release channel ch1;

release channel ch2;

crosscheck archivelog all;

delete noprompt archivelog until time 'sysdate-1';

}

exit;

EOF

# Compress the file

echo "Full RMAN Backup Completed Successfully ..."

echo "Backup successful: " `date` >> $LOGFILE

# Compress the file

echo "Now zipping files ... " `date`

echo "Zipping Files : " `date` >> $LOGFILE

# gzip -r $BACKUP_DIR

# echo "Zipping Files completed: " `date` >> $LOGFILE

# echo "Zipping files completed ..."

# echo ===================================

==========================================

INCREMENTAL BACKUP

==========================================

# Identify the backup location
export BACKUP_DIR=/oracle/RMAN_Backup

# Source the environment file, if any
. /oracle/PROD/db/tech_st/11.2.0/PROD_ebizdb.env

# Clean out older backups. Delete all backups older than 10 days

#find $BACKUP_DIR/* -mtime +10 ! -wholename BACKUP_DIR -delete

# Clean out older backups. Delete all backups older than 7 days
find $BACKUP_DIR/* -mtime +7 ! -wholename BACKUP_DIR -delete

# Create Directory for the new day's backup
date
mkdir $BACKUP_DIR/`date +%F`
export BACKUP_DIR=$BACKUP_DIR/`date +%F`
export LOGFILE=${BACKUP_DIR}/LogRMAN

# Run the RMAN backup script and spool the output
rman target / nocatalog log=$LOGFILE << EOF

run {
allocate channel ch1 type disk format='$BACKUP_DIR/FPPC_PROD_incr_%d_%t_s%s_s%p_CtlFile.bkp';
set limit channel ch1 kbytes=2000000;
backup current controlfile;
release channel ch1;

allocate channel ch1 type disk format='$BACKUP_DIR/FPPC_PROD_incr_%d_%t_s%s_s%p_ArcLog.bkp';
allocate channel ch2 type disk format='$BACKUP_DIR/FPPC_PROD_incr_%d_%t_s%s_s%p_ArcLog.bkp';
set limit channel ch1 kbytes=2000000;
set limit channel ch2 kbytes=2000000;
backup archivelog all filesperset 2;
release channel ch1;
release channel ch2;
crosscheck archivelog all;
delete noprompt archivelog until time 'sysdate-1';

}
exit;
EOF

# Compress the file
echo "Incremental RMAN Backup Completed Successfully ..."
echo "Backup successful: " `date` >> $LOGFILE
# Compress the file

echo "Now zipping files ... " `date`

echo "Zipping Files : " `date` >> $LOGFILE

# gzip -r $BACKUP_DIR
# echo "Zipping Files completed: " `date` >> $LOGFILE
# echo "Zipping files completed ..."
# echo ===================================

Then I run the Restore Command:

1. $ORACLE_HOME/bin/rman target /

2. startup nomount pfile='/oracle/PROD/db/tech_st/11.2.0/dbs/initPROD.ora';

3. restore controlfile from '/oracle/RMAN_Backup/2017-01-05/FPPC_PROD_full_PROD_932489637_s31_s1_CtlFile.bkp';

4. alter database mount;

5. catalog start with '/oracle/RMAN_Backup';

6. crosscheck backup;

7. delete noprompt expired backup;

8. restore database;

But I got error in #8

Error validating file dummy (399) in piece /oracle/RMAN_Backup/2017-04-26_full/FPPC_PROD_full_942323108_s1485_s2_DB.bkp: missing header

Error validating file dummy (4) in piece /oracle/RMAN_Backup/2017-04-26_full/FPPC_PROD_full_942323108_s1485_s2_DB.bkp: missing header

Error validating file dummy (352) in piece /oracle/RMAN_Backup/2017-04-26_full/FPPC_PROD_full_942323108_s1485_s2_DB.bkp: missing header

Error validating file dummy (3) in piece /oracle/RMAN_Backup/2017-04-26_full/FPPC_PROD_full_942323108_s1486_s2_DB.bkp: missing header

Error validating file dummy (5) in piece /oracle/RMAN_Backup/2017-04-26_full/FPPC_PROD_full_942323108_s1486_s2_DB.bkp: missing header

Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x7F684AF82B84] [PC:0x7EAD87E, kgcdm()+4604] [flags: 0x0, count: 1]

Errors in file /oracle/PROD/db/tech_st/11.2.0/admin/PROD_ebizdb/diag/rdbms/prod/PROD/trace/PROD_ora_3842.trc (incident=915678):

ORA-07445: exception encountered: core dump [kgcdm()+4604] [SIGSEGV] [ADDR:0x7F684AF82B84] [PC:0x7EAD87E] [Address not mapped to object] []

Incident details in: /oracle/PROD/db/tech_st/11.2.0/admin/PROD_ebizdb/diag/rdbms/prod/PROD/incident/incdir_915678/PROD_ora_3842_i915678.trc

Use ADRCI or Support Workbench to package the incident.

See Note 411.1 at My Oracle Support for error and packaging details.

Wed Apr 26 15:44:53 2017

Dumping diagnostic data in directory=[cdmp_20170426154453], requested by (instance=1, osid=3842), summary=[incident=915678].

Wed Apr 26 15:44:56 2017

=====================================

RMAN_ERROR.PNG

Please help....

Kind regards,

jc

This post has been answered by Dude! on May 10 2017
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 7 2017
Added on May 3 2017
43 comments
20,214 views