Solved

Getting error using RMAN to backup direct to tape

Posted on 2010-09-20
3
1,295 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:joaotelles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Richard Olutola earned 250 total points
ID: 33723371
On most platforms, to back up to and restore from  sequential media such as tape, you must integrate a media manager with Oracle. A media manager is not an Oracle product and must be obtained from a third-party vendor. If you choose to use RMAN with a media manager, then you must obtain all product-specific information from the vendor.

Have you integrated a media manager with Oracle?

Personally I don't backup directly to tape. Instead, first I backup to disk and then use netbackup to archive my backups to tape.

R.
0
 

Author Comment

by:joaotelles
ID: 33724288
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
0
 

Author Closing Comment

by:joaotelles
ID: 33724293
Very fast and clear answer for my problem.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question