Link to home
Start Free TrialLog in
Avatar of joaotelles
joaotellesFlag for United States of America

asked on

Getting error using RMAN to backup direct to tape

Hi,

Im attempting to perform a backup using RMAN directly to a tape but I getting the error below.
Its Oracle 10g.
Its 64bit Oracle:
oraclea@acgota-01> file oracl*
oracle:         ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
oracleO:        ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

I did the following commands in order to check if the tape was well configured...:
dpa@a-01> cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c0                             scsi-bus     connected    unconfigured unknown
c1                             scsi-bus     connected    configured   unknown
c1::dsk/c1t0d0                 CD-ROM       connected    configured   unknown
c5                             scsi-bus     connected    configured   unknown
c5::rmt/0                      tape         connected    configured   unknown
c6                             scsi-bus     connected    unconfigured unknown
usb0/1                         unknown      empty        unconfigured ok
usb0/2                         unknown      empty        unconfigured ok
usb1/1.1                       unknown      empty        unconfigured ok
usb1/1.2                       unknown      empty        unconfigured ok
usb1/1.3                       unknown      empty        unconfigured ok
usb1/1.4                       unknown      empty        unconfigured ok
usb1/2                         unknown      empty        unconfigured ok

dpa@acgota-01> mt -f /dev/rmt/0 status
HP Ultrium LTO 3 tape drive:
   sense key(0x0)= No Additional Sense   residual= 0   retries= 0
   file no= 0   block no= 0

dpa@acgota-01> tar tvf /dev/rmt/0
tar: tape blocksize error

* I just did this command to make sure that there was nothing on the tape...

Manually it works:

dpa@a-01> ls joatel1
joa1  joa2  joa3
dpa@acgota-01> tar cvf /dev/rmt/0 joatel1
a joatel1/ 0 tape blocks
a joatel1/joa1 0 tape blocks
a joatel1/joa2 0 tape blocks
a joatel1/joa3 0 tape blocks
dpa@a-01> tar tvf /dev/rmt/0
drwxr-xr-x 10001/201      0 Aug  4 09:49 2010 joatel1/
-rwxr-xr-x 10001/201      0 Aug  4 09:49 2010 joatel1/joa1
-rwxr-xr-x 10001/201      0 Aug  4 09:49 2010 joatel1/joa2
-rwxr-xr-x 10001/201      0 Aug  4 09:49 2010 joatel1/joa3

Script used to backup:

 

pa@a-01> cat whole_backup_level_0.rman
# Whole incremental backup level 0 (Sunday)
# Backups the database, archive logs and the controlfile

run
{
   allocate channel t1 type 'SBT_TAPE' PARMS="ENV=(BACKUP_DIR=/dev/rmt/0)";
   backup  incremental level 0
      ( database
        #Setsize is used to limit the size of each backup set
        #Each backup set should fit into one tape
        #setsize 5120000
        format 'db_level0_t%t_s%s_p%p'
        include current controlfile
      );

   sql 'alter system archive log current';

   backup
      ( archivelog all
        delete input
        #Setsize is used to limit the size of each backup set
        #Each backup set should fit into one tape
        #setsize 3072000
        format 'al_t%t_s%s_p%p'
      );

   backup
      ( current controlfile
        format 'cf_t%t_s%s_p%p'
      );
}
exit

 

Log :

 

oraclea@a-01> ./whole_backup_level_0.sh
Starting whole backup level 0...
RMAN-00557: could not open MSGLOG "/var/opt/smarttrust/dpa/log/trace/backup/whole_backup_level_0.log"

Recovery Manager: Release 10.2.0.3.0 - Production on Mon Aug 2 14:29:18 2010

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

connected to target database: DP7A (DBID=2987906652)
using target database control file instead of recovery catalog

RMAN> # Whole incremental backup level 0 (Sunday)
2> # Backups the database, archive logs and the controlfile
3>
4> run
5> {
6>    allocate channel t1 type 'SBT_TAPE' PARMS="ENV=(BACKUP_DIR=/dev/rmt/0)";
7>    backup  incremental level 0
8>       ( database
9>         #Setsize is used to limit the size of each backup set
10>         #Each backup set should fit into one tape
11>         #setsize 5120000
12>         format 'db_level0_t%t_s%s_p%p'
13>         include current controlfile
14>       );
15>
16>    sql 'alter system archive log current';
17>
18>    backup
19>       ( archivelog all
20>         delete input
21>         #Setsize is used to limit the size of each backup set
22>         #Each backup set should fit into one tape
23>         #setsize 3072000
24>         format 'al_t%t_s%s_p%p'
25>       );
26>
27>    backup
28>       ( current controlfile
29>         format 'cf_t%t_s%s_p%p'
30>       );
31> }
32> exit
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on t1 channel at 08/02/2010 14:29:22
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library

Recovery Manager complete.

Checked the:

# ls libo*
libogg.so        libogg.so.0      libogg.so.0.5.0  libotr.so        libotr.so.2      libotr.so.2.0.0
# pwd
/usr/lib

Its not on the oracle library too.

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

 

RMAN confs:

 
RMAN> show all;

RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TYPE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 4 G;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oraclea/product/10.2.0/dbs/snapcf_DP7A.f'; # default


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

 

Any suggestion of how to solve this problem?


Tks,
Joao Telles
ASKER CERTIFIED SOLUTION
Avatar of Rich Olu
Rich Olu
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of joaotelles

ASKER

Tks for the answer.... I have not a media manager integrated. I will follow your suggestion and first I backup to disk and then use netbackup to archive my backups to tape.


Joao Telles
Very fast and clear answer for my problem.