Forum Discussion

bowmanleong's avatar
11 years ago

restore oracle DB backup to another oracle db server

Dear All,

I am doing a a restore testing for restore DB from Oracle RAC environment to another oracle db server.

The oracle spfile is exported from RAC and imported to testing db server. But still cannot restore the DB to testing server.

The following information are the command and error message:

RMAN> set dbid=1753225269
 
executing command: SET DBID
 
RMAN> run {
set controlfile autobackup format for device type DISK to '%F';
ALLOCATE CHANNEL T1 DEVICE TYPE 'SBT_TAPE';
restore controlfile from autobackup MAXSEQ 5 MAXDAYS 9;
}2> 3> 4> 5> 
 
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
using target database control file instead of recovery catalog
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on T1 channel at 01/28/2014 17:32:20
ORA-19554: error allocating device, device type: SBT_TAPE, device name: 
ORA-27211: Failed to load Media Management Library
 
RMAN> run {
set controlfile autobackup format for device type DISK to '%F';
ALLOCATE CHANNEL T1 DEVICE TYPE DISK;
restore controlfile from autobackup MAXSEQ 5 MAXDAYS 9;
}2> 3> 4> 5> 
 
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
 
allocated channel: T1
channel T1: sid=871 devtype=DISK
 
Starting restore at 28-JAN-14
 
channel T1: looking for autobackup on day: 20140128
channel T1: looking for autobackup on day: 20140127
channel T1: looking for autobackup on day: 20140126
channel T1: looking for autobackup on day: 20140125
channel T1: looking for autobackup on day: 20140124
channel T1: looking for autobackup on day: 20140123
channel T1: looking for autobackup on day: 20140122
channel T1: looking for autobackup on day: 20140121
channel T1: looking for autobackup on day: 20140120
channel T1: no autobackup in 9 days found
released channel: T1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/28/2014 17:32:37
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
 
RMAN> run {
set controlfile autobackup format for device type DISK to '%F';
ALLOCATE CHANNEL T1 DEVICE TYPE DISK;
restore controlfile;
}2> 3> 4> 5> 
 
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
 
allocated channel: T1
channel T1: sid=871 devtype=DISK
 
Starting restore at 28-JAN-14
 
released channel: T1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/28/2014 17:33:02
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
 
RMAN> 
  • work with your dba to sort this out

    Error code: ORA-19608
    Description: %s is not a backup piece
     
    Cause:
    The specified file is not a backup piece produced by the dbms_backup_restore package. Either the first block of the backup piece is corrupt or this file is not a backup piece.
     
    Action:
    Specify a different file name and retry the operation.
  • First issue:

    Failed to load Media Management Library

    Seems you forgot to run oracle_link script on Oracle server where you are trying to restore? 
    This is needed to link the NBU plugin with Oracle backup library.

    Next step is to authorize redirected restore on the master server.
    Please follow steps under this topic in 
    NBU for Oracle Admin Guide   http://www.symantec.com/docs/DOC3672

    Redirecting a restore to a different client
    (linking steps also in this manual)

    Steps on destination client under this topic:

    About performing a redirected restore with RMAN

  • Dear Marianne,

    Thank you for your reply!!!

    I ran oracle_link script and tried to restore. The error message"Failed to load media management library" which is gone.

    When I started the following rman command and got the following error, but the NBU Activity Monitor is showed the restore job is "done", please read the following information also:

    RMAN> run {
    set controlfile autobackup format for device type 'SBT_TAPE' to '%F';
    ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE';
    SEND 'NB_ORA_SERV=vasbackup, NB_ORA_CLIENT=mpdb-b-vasclient';
    restore controlfile from autobackup;
    }2> 3> 4> 5> 6> 
    
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    
    allocated channel: CH00
    channel CH00: sid=873 devtype=SBT_TAPE
    channel CH00: Veritas NetBackup for Oracle - Release 7.5 (2012020801)
    
    sent command to channel: CH00
    
    Starting restore at 29-JAN-14
    
    channel CH00: looking for autobackup on day: 20140129
    channel CH00: autobackup found: c-1753225269-20140129-02
    released channel: CH00
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 01/29/2014 16:01:02
    ORA-19870: error reading backup piece c-1753225269-20140129-02
    ORA-19608: c-1753225269-20140129-02 is not a backup piece
    
     
    ::::::::::::::::::::::::::The following messages are copied in netbackup details::::::::::::::::::::::::::::::::::::::
    01/29/2014 16:02:33 - begin Restore
    01/29/2014 16:02:33 - number of images required: 1
    01/29/2014 16:02:33 - media needed: W4O1L4
    01/29/2014 16:02:34 - restoring from image mpdb-b-vasclient_1390932918
    01/29/2014 16:02:35 - Info bpbrm (pid=30794) itcdbtest is the host to restore to
    01/29/2014 16:02:35 - Info bpbrm (pid=30794) telling media manager to start restore on client
    01/29/2014 16:02:35 - Info bpbrm (pid=30794) spawning a brm child process
    01/29/2014 16:02:35 - Info bpbrm (pid=30794) child pid: 30805
    01/29/2014 16:02:35 - Info bpbrm (pid=30794) listening for client connection
    01/29/2014 16:02:36 - Info bptm (pid=30796) Waiting for mount of media id W4O1L4 (copy 1) on server vasbackup.
    01/29/2014 16:02:36 - started process bptm (pid=30796)
    01/29/2014 16:02:36 - mounting W4O1L4
    01/29/2014 16:02:36 - requesting resource W4O1L4
    01/29/2014 16:02:36 - granted resource  W4O1L4
    01/29/2014 16:02:36 - granted resource  HP.ULTRIUM4-SCSI.000
    01/29/2014 16:02:37 - Info bptm (pid=30796) INF - Waiting for mount of media id W4O1L4 on server vasbackup for reading.
    01/29/2014 16:02:37 - Info bpbrm (pid=30794) accepted connection from client
    01/29/2014 16:02:37 - Info tar (pid=5687) Restore started.
    01/29/2014 16:03:37 - mounted W4O1L4; mount time: 0:01:01
    01/29/2014 16:03:37 - Info bptm (pid=30796) W4O1L4
    01/29/2014 16:03:37 - Info bptm (pid=30796) INF - Waiting for positioning of media id W4O1L4 on server vasbackup for reading.
    01/29/2014 16:03:37 - positioning W4O1L4 to file 146
    01/29/2014 16:06:32 - positioned W4O1L4; position time: 0:02:55
    01/29/2014 16:06:32 - begin reading
    01/29/2014 16:06:34 - Info tar (pid=5687) done. status: 0: the requested operation was successfully completed
    01/29/2014 16:06:34 - Info bpbrm (pid=30794) sending message to media manager: STOP RESTORE mpdb-b-vasclient_1390932918 EXIT=0
    01/29/2014 16:06:34 - end reading; read time: 0:00:02
    01/29/2014 16:06:35 - restored from image mpdb-b-vasclient_1390932918; restore time: 0:04:01
    01/29/2014 16:06:35 - end Restore; elapsed time 0:04:02
    the requested operation was successfully completed  (0)
    

     

  • work with your dba to sort this out

    Error code: ORA-19608
    Description: %s is not a backup piece
     
    Cause:
    The specified file is not a backup piece produced by the dbms_backup_restore package. Either the first block of the backup piece is corrupt or this file is not a backup piece.
     
    Action:
    Specify a different file name and retry the operation.
  • Dear wr, Thank you for reply!! I commanded bplist -C mpdb-b-vasclient -t 4 -l -R / and found the file on the list. The file should be backup by NBU. Cheers. Bowman leong