I am SYS

Oracle DBA Adventures

Test backup to tape without a tape library

leave a comment »

If you want to test some backup scripts, crash recovery scenarios, or anything of that sort on a test system, and you don’t have access to an sbt tape library, you can use an Oracle provided sbt “emulator” which puts backups onto a specified disk location, yet acts like an sbt channel.

CONFIGURE CHANNEL DEVICE TYPE ‘SBT_TAPE’ PARMS  ‘SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/u01/app/oracle/sbt)’;

RMAN> backup device type sbt current controlfile;

Starting backup at 08-JUN-10
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=21 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: WARNING: Oracle Test Disk API
channel ORA_SBT_TAPE_1: starting full datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_SBT_TAPE_1: starting piece 1 at 08-JUN-10
channel ORA_SBT_TAPE_1: finished piece 1 at 08-JUN-10
piece handle=17lfnivf_1_1 tag=TAG20100608T140015 comment=API Version 2.0,MMS Version 8.1.3.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-JUN-10

When the backup is done, you can see the backup files on disk, along with a binary file “Oracle_Disk_SBT_Catalog” which seems to be a simple index of sorts.

oracle@micweh1-lucid:/u01/app/oracle$ ls -ltr sbt/
total 16396
-rw-r–r– 1 oracle oinstall 8388616 2010-06-08 14:00 17lfnivf_1_1
-rw-r–r– 1 oracle oinstall 8388616 2010-06-08 14:00 c-2019211406-20100608-00
-rw-r–r– 1 oracle oinstall    3204 2010-06-08 14:00 Oracle_Disk_SBT_Catalog

Advertisement

Written by sys

June 8, 2010 at 2:16 pm

Posted in Oracle

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.