This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Apr 5, 2006 1:14 AM by Laurent Schneider RSS

validating backups

Laurent Schneider Oracle ACE
Currently Being Moderated
Hi there,
I have a fairly simple problem : I want to check if I have a valid backup.

In the documentation, I found REPORT NEED BACKUP and RESTORE VALIDATE DATABASE. But none of them seems to work :-(

Ok, here is my scenario

at the beginning, I have no backup
connected to target database: LSC75 (DBID=1093677405)
connected to recovery catalog database

RMAN> list backup;


RMAN> list copy;

specification does not match any archive log in the recovery catalog
Now I do a backup:
RMAN> backup database plus archivelog delete input;
Starting backup at 20.03.2006 12:19:16
current log archived
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=1164 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: Tivoli Data Protection for Oracle: version 5.2.0.0
channel ORA_SBT_TAPE_1: starting archive log backupset
channel ORA_SBT_TAPE_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=5 recid=2 stamp=585577044
input archive log thread=1 sequence=6 recid=3 stamp=585577161
channel ORA_SBT_TAPE_1: starting piece 1 at 20.03.2006 12:19:29
channel ORA_SBT_TAPE_1: finished piece 1 at 20.03.2006 12:19:32
piece handle=02heecmg_1_1 tag=TAG20060320T121927 comment=API Version 2.0,MMS Version 5.2.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:04
channel ORA_SBT_TAPE_1: deleting archive log(s)
archive log filename=/dbms/oracle/LSC75/arch/arch_584379933_1_5.dbf recid=2 stamp=585577044
archive log filename=/dbms/oracle/LSC75/arch/arch_584379933_1_6.dbf recid=3 stamp=585577161
Finished backup at 20.03.2006 12:19:32

Starting backup at 20.03.2006 12:19:32
using channel ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: starting full datafile backupset
channel ORA_SBT_TAPE_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/dbms/oracle/LSC75/data/sysaux01LSC75.dbf
input datafile fno=00001 name=/dbms/oracle/LSC75/data/system01LSC75.dbf
input datafile fno=00002 name=/dbms/oracle/LSC75/data/undo01LSC75.dbf
input datafile fno=00004 name=/dbms/oracle/LSC75/data/users01LSC75.dbf
channel ORA_SBT_TAPE_1: starting piece 1 at 20.03.2006 12:19:33
channel ORA_SBT_TAPE_1: finished piece 1 at 20.03.2006 12:20:38
piece handle=03heecml_1_1 tag=TAG20060320T121932 comment=API Version 2.0,MMS Version 5.2.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:05
Finished backup at 20.03.2006 12:20:38

Starting backup at 20.03.2006 12:20:38
current log archived
using channel ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: starting archive log backupset
channel ORA_SBT_TAPE_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=7 recid=4 stamp=585577238
channel ORA_SBT_TAPE_1: starting piece 1 at 20.03.2006 12:20:42
channel ORA_SBT_TAPE_1: finished piece 1 at 20.03.2006 12:20:45
piece handle=04heecop_1_1 tag=TAG20060320T122041 comment=API Version 2.0,MMS Version 5.2.0.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:04
channel ORA_SBT_TAPE_1: deleting archive log(s)
archive log filename=/dbms/oracle/LSC75/arch/arch_584379933_1_7.dbf recid=4 stamp=585577238
Finished backup at 20.03.2006 12:20:46

Starting Control File and SPFILE Autobackup at 20.03.2006 12:20:46
piece handle=autobackup_c-1093677405-20060320-00 comment=API Version 2.0,MMS Version 5.2.0.0
Finished Control File and SPFILE Autobackup at 20.03.2006 12:20:55
Than I archive one log
SQL> select THREAD#,SEQUENCE#,CREATOR,ARCHIVED,DELETED,NAME from v$archived_log;
   THREAD#  SEQUENCE# CREATOR ARC DEL NAME
---------- ---------- ------- --- --- ------------------------------------------------------------
         1          4 ARCH    YES YES
         1          5 ARCH    YES YES
         1          6 FGRD    YES YES
         1          7 FGRD    YES YES

SQL> alter system archive log current;

System altered.

SQL> select THREAD#,SEQUENCE#,CREATOR,ARCHIVED,DELETED,NAME from v$archived_log;
   THREAD#  SEQUENCE# CREATOR ARC DEL NAME
---------- ---------- ------- --- --- ------------------------------------------------------------
         1          4 ARCH    YES YES
         1          5 ARCH    YES YES
         1          6 FGRD    YES YES
         1          7 FGRD    YES YES
         1          8 ARCH    YES NO  /dbms/oracle/LSC75/arch/arch_584379933_1_8.dbf
Yet I delete manually one archive log, for this test, and I ask rman to take notice the file disappears
$ rm /dbms/oracle/LSC75/arch/arch_584379933_1_8.dbf

RMAN> crosscheck archivelog sequence 8 thread 1;
validation failed for archived log
archive log filename=/dbms/oracle/LSC75/arch/arch_584379933_1_8.dbf recid=5 stamp=585577588
Crosschecked 1 objects
at this point, I do not have a copy of log 8, so I am no longer able to restore my database without data loss

but I cannot find out this info using rman.

I tried REPORT NEED BACKUP
RMAN> report need backup recovery window of 1 days;

Report of files that must be backed up to satisfy 1 days recovery window
File Days  Name
---- ----- -----------------------------------------------------

RMAN> report need backup redundancy 1;

Report of files with less than 1 redundant backups
File #bkps Name
---- ----- -----------------------------------------------------
Nothing!

And RESTORE VALIDATE
RMAN> restore validate database;

Starting restore at 20.03.2006 12:29:52
piece handle=03heecml_1_1 tag=TAG20060320T121932
channel ORA_SBT_TAPE_1: validation complete, elapsed time: 00:00:37
Finished restore at 20.03.2006 12:30:39
again, no info that sequence 8 is missing.


What are your opinions?

Thanks for feedback
Laurent
  • 1. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Salut Laurent

    I think that the "report need backup ..." give you the right result. To find out that your backup will not run I suggest you another test. A restore validate with the option "until time ...".

    It should work. In the bad case let me know that I will simulate this situation (very interessting).

    Bye, Aron
  • 2. Re: validating backups
    Laurent Schneider Oracle ACE
    Currently Being Moderated
    Hi Aron,
    Why do you think it is right not to report a file needs backup when it cannot be recovered consistently?

    Until time will not help.
    RMAN> restore database validate until time "sysdate-1/86400";
    Starting restore at 20.03.2006 19:05:49
    ...
    validation complete, elapsed time: 00:00:47
    Finished restore at 20.03.2006 19:07:04
  • 3. Re: validating backups
    93654 Newbie
    Currently Being Moderated
    Hello,

    This is pretty interesting stuff. I tried to do the same on my test server. Well you are right rman did not show the missing archived file when you validate the backup. But I tried this.

    $ sh orcl.sh

    Recovery Manager: Release 10.2.0.1.0 - Production on Mon Mar 20 10:45:56 2006

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: ORCL (DBID=1112844671)
    connected to recovery catalog database

    RMAN> list backup;


    RMAN> list copy;

    specification does not match any archive log in the recovery catalog

    RMAN> @scripts/orcl_full_arch_Mon

    RMAN> run {
    2> #
    3> # Full database backup level 0
    4> # backup archive logs and delete
    5> # Author : Srikanth Pulikonda
    6> # Database: ORCL
    7> #
    8> allocate channel dev1 type disk;
    9> backup
    10> incremental level 0
    11> filesperset 4
    12> format 'D:\backup\ORCL\rman\Full_Mon_Level0_%t'
    13> tag Full_Arch_Mon
    14> (database);
    15> backup archivelog all delete input;
    16> release channel dev1;
    17> }
    allocated channel: dev1
    channel dev1: sid=143 devtype=DISK

    Starting backup at 20-MAR-06
    channel dev1: starting incremental level 0 datafile backupset
    channel dev1: specifying datafile(s) in backupset
    input datafile fno=00001 name=D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
    input datafile fno=00003 name=D:\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
    input datafile fno=00004 name=D:\ORACLE\ORADATA\ORCL\USERS01.DBF
    input datafile fno=00002 name=D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
    channel dev1: starting piece 1 at 20-MAR-06
    channel dev1: finished piece 1 at 20-MAR-06
    piece handle=D:\BACKUP\ORCL\RMAN\FULL_MON_LEVEL0_585571575 tag=FULL_ARCH_MON comment=NONE
    channel dev1: backup set complete, elapsed time: 00:01:36
    Finished backup at 20-MAR-06

    Starting backup at 20-MAR-06
    current log archived
    channel dev1: starting archive log backupset
    channel dev1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=11 recid=10 stamp=585571686
    channel dev1: starting piece 1 at 20-MAR-06
    channel dev1: finished piece 1 at 20-MAR-06
    piece handle=D:\ORACLE\ORADATA\ORCL\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2006_03_20\O1_MF_ANNNN_TAG20060320T104811_21XY7FZ2_.BKP tag=TAG20060320T104811 comment=NONE
    channel dev1: backup set complete, elapsed time: 00:00:04
    channel dev1: deleting archive log(s)
    archive log filename=D:\ORACLE\ORADATA\ORCL\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_03_20\O1_MF_1_11_21XY72YX_.ARC recid=10 stamp=585571686
    Finished backup at 20-MAR-06

    Starting Control File Autobackup at 20-MAR-06
    piece handle=D:\BACKUP\ORCL\RMAN\C-1112844671-20060320-00 comment=NONE
    Finished Control File Autobackup at 20-MAR-06

    released channel: dev1

    RMAN> resync catalog;
    starting full resync of recovery catalog
    full resync complete

    RMAN> **end-of-file**

    RMAN>
    ORCL>select THREAD#,SEQUENCE#,CREATOR,ARCHIVED,DELETED,NAME from v$archived_log

    THREAD# SEQUENCE# CREATOR ARC DEL NAME
    ---------- ---------- ------- --- --- ----------
    1 2 ARCH YES YES
    1 3 ARCH YES YES
    1 4 ARCH YES YES
    1 5 FGRD YES YES
    1 6 ARCH YES YES
    1 7 ARCH YES YES
    1 8 ARCH YES YES
    1 9 ARCH YES YES
    1 10 ARCH YES YES
    1 11 FGRD YES YES

    10 rows selected.

    ORCL>alter system archive log current;

    System altered.

    ORCL>select THREAD#,SEQUENCE#,CREATOR,ARCHIVED,DELETED,NAME from v$archived_log

    THREAD# SEQUENCE# CREATOR ARC DEL NAME
    ---------- ---------- ------- --- --- --------------------------------------------------
    1 2 ARCH YES YES
    1 3 ARCH YES YES
    1 4 ARCH YES YES
    1 5 FGRD YES YES
    1 6 ARCH YES YES
    1 7 ARCH YES YES
    1 8 ARCH YES YES
    1 9 ARCH YES YES
    1 10 ARCH YES YES
    1 11 FGRD YES YES
    1 12 FGRD YES NO D:\ORACLE\ORADATA\ORCL\FLASH_RECOVERY_AREA\ORCL\AR
    CHIVELOG\2006_03_20\O1_MF_1_12_21XYB9PP_.ARC

    RMAN> restore validate database;

    Starting restore at 20-MAR-06
    using channel ORA_DISK_1

    channel ORA_DISK_1: starting validation of datafile backupset
    channel ORA_DISK_1: reading from backup piece D:\BACKUP\ORCL\RMAN\FULL_MON_LEVEL0_585571575
    channel ORA_DISK_1: restored backup piece 1
    piece handle=D:\BACKUP\ORCL\RMAN\FULL_MON_LEVEL0_585571575 tag=FULL_ARCH_MON
    channel ORA_DISK_1: validation complete, elapsed time: 00:00:25
    Finished restore at 20-MAR-06

    RMAN> crosscheck archivelog sequence 12 thread 1;

    released channel: ORA_DISK_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=140 devtype=DISK
    validation failed for archived log
    archive log filename=D:\ORACLE\ORADATA\ORCL\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_03_20\O1_MF_1_12_21XYB9PP_.ARC recid=11 stamp=585571785
    Crosschecked 1 objects

    RMAN> list expired archivelog sequence 12 thread 1;

    List of Archived Log Copies
    Key Thrd Seq S Low Time Name
    ------- ---- ------- - --------- ----
    14161 1 12 X 20-MAR-06 D:\ORACLE\ORADATA\ORCL\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2006_03_20\O1_MF_1_12_21XYB9PP_.ARC

    RMAN> restore archivelog all validate;

    Starting restore at 20-MAR-06
    using channel ORA_DISK_1

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/20/2006 11:08:43
    RMAN-06026: some targets not found - aborting restore
    RMAN-06025: no backup of log thread 1 seq 12 lowscn 806217 found to restore


    -Sri
  • 4. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Hi Laurent

    I think that REPORT ... NEED BACKUP ... lists the right output because this command return only the datafiles that require a backup, not archived logs.

    Sri wrote the right solution to validate the existence of the archived logs:
    restore archivelog all validate;.


    However, we don't need to execute a restore to know if all archived logs are available: list expired archivelog from scn=1; is enought.
    In the bottom of this report I wrote a sample of validation of the backup using the archived logs (what are you searching).
    SQL> !mv /db/ARON/archiver/1_71.dbf /db/ARON/archiver/1_71.dbf_old

    RMAN> crosscheck archivelog all;

    released channel: ORA_DISK_1
    released channel: ORA_SBT_TAPE_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=17 devtype=DISK
    ...
    validation succeeded for archived log
    archive log filename=/db/ARON/archiver/1_70.dbf recid=254 stamp=585607109
    validation failed for archived log
    archive log filename=/db/ARON/archiver/1_71.dbf recid=255 stamp=585607111

    validation succeeded for archived log
    archive log filename=/db/ARON/archiver/1_72.dbf recid=256 stamp=585607565
    ...


    RMAN> list expired archivelog from scn=1;


    List of Archived Log Copies
    Key     Thrd Seq     S Low Time  Name
    ------- ---- ------- - --------- ----
    3840    1    71      X 20-MAR-06 /db/ARON/archiver/1_71.dbf
    Now, restore with a failing archived log:
    RMAN> restore database archivelog all validate;

    Starting restore at 20-MAR-06

    using channel ORA_DISK_1
    using channel ORA_SBT_TAPE_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/20/2006 21:11:45
    RMAN-06026: some targets not found - aborting restore
    RMAN-06025: no backup of log thread 1 seq 71 scn 7332142288 found to restore
    Finally, the restore of the database using the archived log without failing archived logs:
    SQL> !mv /db/ARON/archiver/1_71.dbf_old /db/ARON/archiver/1_71.dbf


    RMAN> crosscheck archivelog all;
    released channel: ORA_DISK_1
    released channel: ORA_SBT_TAPE_1
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=17 devtype=DISK
    ...
    validation succeeded for archived log
    archive log filename=/db/ARON/archiver/1_70.dbf recid=254 stamp=585607109
    validation succeeded for archived log
    archive log filename=/db/ARON/archiver/1_71.dbf recid=255 stamp=585607111
    validation succeeded for archived log
    archive log filename=/db/ARON/archiver/1_72.dbf recid=256 stamp=585607565
    ...


    RMAN> restore database archivelog all validate;

    Starting restore at 20-MAR-06

    using channel ORA_DISK_1
    allocated channel: ORA_SBT_TAPE_1
    channel ORA_SBT_TAPE_1: sid=18 devtype=SBT_TAPE
    channel ORA_SBT_TAPE_1: Tivoli Data Protection for Oracle: version 5.2.0.0
    channel ORA_DISK_1: scanning archive log /db/ARON/archiver/1_65.dbf
    channel ORA_SBT_TAPE_1: scanning archive log /db/ARON/archiver/1_66.dbf
    channel ORA_DISK_1: scanning archive log /db/ARON/archiver/1_67.dbf
    channel ORA_SBT_TAPE_1: scanning archive log /db/ARON/archiver/1_68.dbf
    channel ORA_DISK_1: scanning archive log /db/ARON/archiver/1_69.dbf
    channel ORA_SBT_TAPE_1: scanning archive log /db/ARON/archiver/1_70.dbf
    channel ORA_DISK_1: scanning archive log /db/ARON/archiver/1_71.dbf
    channel ORA_SBT_TAPE_1: scanning archive log /db/ARON/archiver/1_72.dbf
    channel ORA_DISK_1: starting validation of archive log backupset
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582407055_264_1_88hbdksf_1_1.bck tag=TAG20060214T194415 params=NULL
    channel ORA_DISK_1: validation complete
    channel ORA_DISK_1: starting validation of archive log backupset
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582407107_266_1_8ahbdku3_1_1.bck tag=TAG20060214T194507 params=NULL
    channel ORA_DISK_1: validation complete
    channel ORA_DISK_1: starting validation of archive log backupset
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582407211_267_1_8bhbdl1b_1_1.bck tag=TAG20060214T194651 params=NULL
    channel ORA_DISK_1: validation complete
    channel ORA_DISK_1: starting validation of archive log backupset
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582407262_269_1_8dhbdl2u_1_1.bck tag=TAG20060214T194742 params=NULL
    channel ORA_DISK_1: validation complete
    channel ORA_DISK_1: starting validation of datafile backupset
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_583004764_270_1_8ehbvsis_1_1.bck tag=TAG20060221T174604 params=NULL
    channel ORA_DISK_1: validation complete
    Finished restore at 20-MAR-06
    HTH

    Bye, Aron
  • 5. Re: validating backups
    Laurent Schneider Oracle ACE
    Currently Being Moderated
    those are workarounds for my test scenario, but it does not help me to find out if a backup is valid
    RMAN> delete noprompt expired archivelog all;
    List of Archived Log Copies
    Key     Thrd Seq     S Low Time            Name
    ------- ---- ------- - ------------------- ----
    18741   1    10      X 21.03.2006 09:47:08 /dbms/oracle/LSC75/arch/arch_584379933_1_10.dbf
    deleted archive log
    archive log filename=/dbms/oracle/LSC75/arch/arch_584379933_1_10.dbf recid=7 stamp=585655495
    Deleted 1 EXPIRED objects
    now what?

    I do not have a valid backup. archive 10 is missing. but how do I find out ?

    restore database archivelog all validate;
    will not report the missing log
  • 6. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Hi Laurent

    You are right: if you delete the expired archivelog RMAN will not complain.

    Those "workaround" are the only solution to validate backups. Here a very good note:
    Note:338607.1 How To Check (Validate) If RMAN Backup(s) Are Good
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=338607.1

    We must survive with that ;-)

    Bye, Aron


    Applies to:
    -----------
    Oracle Server version 9i and 10g

    Goal:
    =====
    Check the RMAN backups to be sure they can be used for a restore.


    Solution:
    =========

    To test the most recent RMAN database backup:

    RMAN> restore validate database;

    To test the most recent RMAN spfile backup:

    RMAN> restore validate spfile to 'c:\temp\spfile.ora';

    To test the most recent RMAN controlfile backup:

    RMAN> restore validate controlfile to 'c:\temp\control01.ctl';

    To test the most recent RMAN archivelog file(s) backup. First determine which
    archivelog sequences are in the last backup:

    RMAN> list backup of archivelog all;
    or
    RMAN> list backup of archivelog all completed after 'sysdate -1';

    then:

    RMAN> restore validate archivelog from sequence ????? until sequence XXXXX?;

    where ????? is the beginning number (inclusive) and XXXXX is the ending
    sequence number (non-inclusive).


    Example:
    --------

    RMAN> list backup of archivelog all completed after 'sysdate -1';

    List of Backup Sets
    ===================

    BS Key Size Device Type Elapsed Time Completion Time
    ------- ---------- ----------- ------------ -------------------
    250 4M DISK 00:00:01 2005-10-21:15:33:05
    BP Key: 246 Status: AVAILABLE Tag: TAG20051021T153304
    Piece Name: C:\ORACLE\PRODUCT\9.2\DATABASE\80H1OM9G_1_1

    List of Archived Logs in backup set 250
    Thrd Seq Low SCN Low Time Next SCN Next Time
    ---- ------- ---------- ------------------- ---------- ---------
    1 53 7864958 2005-10-21:14:14:46 7877057 2005-10-21:15:33:03

    BS Key Size Device Type Elapsed Time Completion Time
    ------- ---------- ----------- ------------ -------------------
    253 325K DISK 00:00:01 2005-10-21:15:38:51
    BP Key: 249 Status: AVAILABLE Tag: TAG20051021T153850
    Piece Name: C:\ORACLE\PRODUCT\9.2\DATABASE\83H1OMKA_1_1

    List of Archived Logs in backup set 253
    Thrd Seq Low SCN Low Time Next SCN Next Time
    ---- ------- ---------- ------------------- ---------- ---------
    1 54 7877057 2005-10-21:15:33:03 7877936 2005-10-21:15:38:50

    RMAN> restore validate archivelog from sequence 53 until sequence 55;

    Starting restore at 2005-10-21:15:39:24

    using channel ORA_DISK_1
    using channel ORA_DISK_2
    channel ORA_DISK_1: starting validation of archive log backupset
    channel ORA_DISK_2: starting validation of archive log backupset
    channel ORA_DISK_2: restored backup piece 1
    piece handle=C:\ORACLE\PRODUCT\9.2\DATABASE\83H1OMKA_1_1 tag=TAG20051021T153850
    params=NULL
    channel ORA_DISK_2: validation complete
    channel ORA_DISK_1: restored backup piece 1
    piece handle=C:\ORACLE\PRODUCT\9.2\DATABASE\80H1OM9G_1_1 tag=TAG20051021T153304
    params=NULL
    channel ORA_DISK_1: validation complete
    Finished restore at 2005-10-21:15:39:26

    With these four commands you can test whether or not your RMAN backup of the
    spfile, controlfile, datafiles and archivelog files are good.


    To test for earlier backups, the earlier than the most recent backups taken,
    consider the use of TAG as in this example:

    RMAN> restore validate database from tag=<tag here>;

    or for other options to validate earlier backups see this note:

    Note 209214.1 How To Restore From An Old Backupset Using RMAN?


    References:
    -----------

    Note 125303.1 Maintaining V8.0 and V8.1 RMAN Repository (Has 8.0 / 8i syntax)
    Oracle9i Backup and Recovery Concepts
    Oracle Database Backup and Recovery Reference, 10g Release 2 (10.2), RESTORE
  • 7. Re: validating backups
    Laurent Schneider Oracle ACE
    Currently Being Moderated
    not ok

    restore archivelog from sequence 9 until sequence 13 validate; does not report sequence 10 is missing!
    RMAN> restore archivelog from sequence 9 until sequence 13 validate;
    Starting restore at 21.03.2006 11:49:31
    channel ORA_DISK_2: scanning archive log /dbms/oracle/LSC75/arch/arch_584379933_1_11.dbf
    channel ORA_DISK_3: scanning archive log /dbms/oracle/LSC75/arch/arch_584379933_1_12.dbf
    channel ORA_SBT_TAPE_1: starting validation of archive log backupset
    channel ORA_SBT_TAPE_1: reading from backup piece 08hego76_1_1
    channel ORA_SBT_TAPE_1: restored backup piece 1
    piece handle=08hego76_1_1 tag=TAG20060321T094822
    channel ORA_SBT_TAPE_1: validation complete, elapsed time: 00:00:08
    Finished restore at 21.03.2006 11:49:52
  • 8. Re: validating backups
    KuljeetPalSingh Guru
    Currently Being Moderated
    Hi,
    because rman don't have a backup of sequence 10 .

    if u want that rman will report u on missing archivelog then use reverse of this cmd.

    backup validate archivelog from sequence 9 until sequence 13 ;

    thats why we always use crosscheck cmd before taking backup by rman that it identify the missing file.

    Thanks
    Kuljeet
  • 9. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    The problem in not solved. I removed the sequence 71 but no error is printed out.
    RMAN> backup validate archivelog from sequence 60 until sequence 72;

    Starting backup at 21-03-2006 13:02:53
    released channel: ORA_SBT_TAPE_1
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=65 recid=249 stamp=582988127
    input archive log thread=1 sequence=66 recid=250 stamp=583607733
    input archive log thread=1 sequence=67 recid=251 stamp=584373375
    input archive log thread=1 sequence=68 recid=252 stamp=584966024
    input archive log thread=1 sequence=69 recid=253 stamp=585596226
    input archive log thread=1 sequence=70 recid=254 stamp=585607109
    input archive log thread=1 sequence=72 recid=256 stamp=585607565
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 21-03-2006 13:02:57
    Bye, Aron
  • 10. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Hi Laurent

    That is a very bad situation. I will open a Oracle Service Request for better explaination. I expected an error, too!

    However, I ever tested my backups restoring the database on an new host. For me that is the only safe solution. More time-expensive but after the test we can be sure that the database is restorable.

    I will let you know the Oracle's answer!

    Bye, Aron
  • 11. Re: validating backups
    KuljeetPalSingh Guru
    Currently Being Moderated
    Hi,

    But this cmd is working fine in my database.
    version 10g Enterprise Edition Release 10.1.0.2.0 on linux

    Have a look
    i move follwing file(sequence 659) as
    mv 1_659_579953979.dbf 1_659_579953979.dbf.old

    RMAN> backup validate archivelog from sequence 655 until sequence 660;

    Starting backup at 21-MAR-06
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=128 devtype=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 03/21/2006 17:53:19
    RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
    ORA-19625: error identifying file /oracle/oradata/test/archive/1_659_579953979.dbf
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
  • 12. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Hi

    In an example above I simulated the same situation. but if you delete the expired archived log using crosscheck and then: delete noprompt expired archivelog all;, no error will be prompted. That is not a usual situation but can happen.

    Bye, Aron
  • 13. Re: validating backups
    358284 Newbie
    Currently Being Moderated
    I have a similar problem. The code below is used for a nightly backup:

    1 crosscheck archivelog all;
    2 delete noprompt expired archivelog all;
    3 delete noprompt expired backup;
    4 backup database;
    5 backup force (archivelog all);
    6 delete noprompt archivelog all completed before 'sysdate-3';

    Sometimes I'll get the "RMAN-06059: expected archived log not found, lost of archived log compromises recoverability" error during backup (line5). However, that exact same file appeared to have validated successful during the crosscheck (line1) and did not appear to be deleted (line2).

    Is this behaviour in sync with what has been observed so far?

    Thanks,
    Gloria
  • 14. Re: validating backups
    475667 Newbie
    Currently Being Moderated
    Hi Gloria

    I don't think that it is the same problem. We are trying to validate backups (check if a backup is valid or not).

    Did you try to remove the line 6 from your backup strategy as told in thread: logs are archived but not backed up ?

    When do you have RMAN-06059? During backup or restore? Don't use the command: delete noprompt archivelog all completed before 'sysdate-3'. Try to work with retention policy and the obsolete-concept.

    Bye, Aron
1 2 Previous Next