RMAN Restore Validate

Posted: March 29, 2012 in RMAN

The RMAN restore validate command can be very useful to test the integrity of your backups on tape or disk; it is sometimes not feasible to test a restore so we can at least run the restore validate as a test. We can check for database, controlfile, spfile or archivelogs.

Restore database test

RMAN> restore database validate;
Starting restore at 28-03-2012 14:12:13
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_22/o1
_mf_nnnd0_TAG20120222T102840_7n9jtv3m_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_22/o1_mf_nnnd0_TAG20120222T102840_7n9jtv3m_.bkp tag=TAG20120222T102840
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_27/o1_mf_nnnd1_TAG20120227T210012_7nqvpykl_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_27/o1_mf_nnnd1_TAG20120227T210012_7nqvpykl_.bkp tag=TAG20120227T210012
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
Finished restore at 28-03-2012 14:13:02

Restore selected archivelogs

RMAN> restore archivelog from logseq 290 until logseq 300 validate;
Starting restore at 28-03-2012 14:15:51
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of archived log backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_03_06/o1_mf_annnn_TAG20120306T210209_7odytpz4_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_03_06/o1_mf_annnn_TAG20120306T210209_7odytpz4_.bkp tag=TAG20120306T210209
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 28-03-2012 14:15:53
RMAN>

Restore Controlfile test

RMAN> restore controlfile validate;
Starting restore at 28-03-2012 14:13:12
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/autobackup/2012_03_06/o1_mf_s_777243776_7odyw21k_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/autobackup/2012_03_06/o1_mf_s_777243776_7odyw21k_.bkp tag=TAG20120306T210256
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 28-03-2012 14:13:13

Restore spfile test

RMAN> restore spfile validate;
Starting restore at 28-03-2012 14:13:19
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/autobackup/2012_03_06/o1_mf_s_777243776_7odyw21k_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/autobackup/2012_03_06/o1_mf_s_777243776_7odyw21k_.bkp tag=TAG20120306T210256
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 28-03-2012 14:13:20

Point in time recovery test

RMAN> run {
2> set until time “to_date(’28/03/12 13:00:00′ , ‘dd/mm/yy hh24:mi:ss’)”;
3> restore database validate;
4> }

executing command: SET until clause

Starting restore at 28-03-2012 14:06:15

using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_22/o1_mf_nnnd0_TAG20120222T102840_7n9jtv3m_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_22/o1_mf_nnnd0_TAG20120222T102840_7n9jtv3m_.bkp tag=TAG20120222T102840
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:46
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_27/o1_mf_nnnd1_TAG20120227T210012_7nqvpykl_.bkp
channel ORA_DISK_1: piece handle=/wload/test1/app/oracle/flash_recovery_area/TESTDB1/backupset/2012_02_27/o1_mf_nnnd1_TAG20120227T210012_7nqvpykl_.bkp tag=TAG20120227T210012
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
Finished restore at 28-03-2012 14:07:04

RMAN>


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s