Forum Stats

  • 3,769,714 Users
  • 2,253,014 Discussions
  • 7,875,157 Comments

Discussions

RMAN-06172 no AUTOBACKUP found or specified handle is not a valid copy or pices

orasiya
orasiya Member Posts: 427 Bronze Badge
edited Jun 27, 2020 5:18AM in Recovery Manager (RMAN)

Dear  supporter,

we need to test our DB server backup - level 0 with RMAN 11.2 on destination DB server. (Our Disaster Scenario)

on source DB server  11.2 we have backup level-0 on directory (/old_backups ) , with Controlfile autobackup on & autobackup format '%F'  setting.

But we could not restore spfile or controlfile,  as follows

-- destination DB server 11.2

RMAN> SET DBID xxxxxxxxxxx;RMAN>startup nomount pfile='/u01/oradata/dbm011/initmy.ora'RMAN> RUN {    SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/old_backups/%F';    RESTORE SPFILE FROM AUTOBACKUP maxdays 365;    }

channel ORA_DISK_1 : no AUTOBACKUP in 365 days found

RMAN-06172 no AUTOBACKUP found or specified handle is not a valid copy or pices

what's wrong?

regards

siyavus

orasiyaJoerg.Sobottka

Best Answer

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 9, 2020 5:51AM Accepted Answer

    You can't SET, you have to say CONFIGURE

    Wrong: RMAN> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOC1/orcl/CONTROLFILE/%F';

    Better: RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOC1/orcl/CONTROLFILE/%F';

    orasiya
«1

Answers

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 8, 2020 8:21AM

    First: /old_backups is accessible from the "new server"?

    Second: You have to restore the controlfile first, because the autobackup file name(s) are part of the metadata catalog INSIDE of the controlfile. Your approach may work, but only if you are using an RMAN catalog - as the external catalog does know the files for your DBID.

    Alternatively you can specify the backup location in your restore spfile:

    restore spfile from 'backup path/file';

    orasiya
  • orasiya
    orasiya Member Posts: 427 Bronze Badge
    edited Jun 8, 2020 9:04AM

    we did   mount  /old_backups    under /u01   as /u01/old_backups   with  user owner oracle , group dba   setting.

    have you show us example code, we connect to destination server  as rman target /

    regards

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 8, 2020 9:17AM

    rman> startup nomount

    rman> setdbid=XXXXX;

    rman> run {

    rman> restore controlfile from '/u01/old_backups/<backup-piece-name>';

    rman> alter database mount;

    rman> }

    rman> restore database preview;

    orasiya
  • orasiya
    orasiya Member Posts: 427 Bronze Badge
    edited Jun 8, 2020 9:37AM

    Dear Joerg,

    we have over 35000 backup files pieces at directory /u01/old_backups ! which of them could be used ? can we use only directory name with maxdays 365 ?

    restore controlfile from '/u01/old_backups/<backup-piece-name>';

    regards

    siyavus

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 8, 2020 9:41AM

    This only works with an external RMAN catalog OR with FRA, I think.

    But %F should be as name "C-<DATABASEID><YEARMONTHDAY>-..."

    orasiya
  • orasiya
    orasiya Member Posts: 427 Bronze Badge
    edited Jun 8, 2020 10:57AM

    Dear Joerg;

    our backup script is as

    {

    allocate channel ch12 device type disk format '/zfssa/orcl/backupset2/FULL_%U';

    allocate channel ch13 device type disk format '/zfssa/orcl/backupset1/FULL_%U';

    backup as backupset incremental level 0 section size 32g database tag 'RMAN/FULLBACKUPSET_L0' plus archivelog not backed up 2 times;

    DELETE NOPROMPT OBSOLETE;

    }

    This means after each backup or physical modifications an control file autobackup will be done!

    but we can not find these autobackups file ?

    --Source DB server rman settings

    RMAN> show all;

    using target database control file instead of recovery catalog

    RMAN configuration parameters for database with db_unique_name orcl are:

    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

    CONFIGURE BACKUP OPTIMIZATION OFF; # default

    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

    CONFIGURE CONTROLFILE AUTOBACKUP ON;

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

    CONFIGURE MAXSETSIZE TO UNLIMITED; # default

    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+RECOC1/orcl/snapcf_orcl.f';

    best regards

    siyavus

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 8, 2020 11:14AM

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';

    => The default location for the autobackup on disk is the fast recovery area (if configured) or a platform-specific location (if not configured).

    So it is not placed in your /u01/

    Have a look at the alert.log, there is an entry where it is placed after each successful autobackup.

    Could be e.g. at $ORACLE_HOME/dbs

    Please reconfigure your environment to the right path(s).

    orasiya
  • EdStevens
    EdStevens Member Posts: 28,529 Gold Crown
    edited Jun 8, 2020 11:51AM
    Siyavuş AK wrote:we did mount /old_backups under /u01 as /u01/old_backups <snip>regards

    Then, on the new server, its name is not /old_backups.  It is /u01/old/backups.  The new server knows nothing about /old_backups.

    orasiya
  • orasiya
    orasiya Member Posts: 427 Bronze Badge
    edited Jun 9, 2020 5:22AM

    Dear Jörg,

    many thanks for your concern

    SQL> show parameter db_recovery_file;

    NAME                                 TYPE        VALUE

    ------------------------------------ ----------- ------------------------------

    db_recovery_file_dest                    string      +RECOC1

    db_recovery_file_dest_size           big integer 500000M

    SQL>

    **** setting the autobackup Format does not effect the man configuration !!! ****

    RMAN> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOC1/orcl/CONTROLFILE/%F';

    executing command: SET CONTROLFILE AUTOBACKUP FORMAT

    RMAN> show all;

    RMAN configuration parameters for database with db_unique_name orcl are:

    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

    CONFIGURE BACKUP OPTIMIZATION OFF; # default

    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

    CONFIGURE CONTROLFILE AUTOBACKUP ON;

    #not effected

    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

    regrads

    siyavuş

  • Joerg.Sobottka
    Joerg.Sobottka Senior Consultant and Oracle Ace Member Posts: 596 Bronze Trophy
    edited Jun 9, 2020 5:51AM Accepted Answer

    You can't SET, you have to say CONFIGURE

    Wrong: RMAN> set CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOC1/orcl/CONTROLFILE/%F';

    Better: RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '+RECOC1/orcl/CONTROLFILE/%F';

    orasiya