Pseudo tape backup with RMAN
Today I was looking for a way to test RMAN tape backup on a machine without a tape device. I barely remembered that I somewhere read that RMAN supports that. With some cross search on different keywords I finally found Metalink support note 312737.1 “RMAN and Specific Media Managers Environment Variables.” .
Here is the output from my backup test on Windows 2003 (x86) with Oracle 10.2.0.2:
RMAN> run {
2> allocate channel c1 device type 'SBT_TAPE'
3> parms="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=D:\BACKUP)";
4> backup database;
5> }
allocated channel: c1
channel c1: sid=27 devtype=SBT_TAPE
channel c1: WARNING: Oracle Test Disk API
Starting backup at 23.03.10
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=E:\ORADATA\ORA5\DATA\DATA01\SYSTEM01.DBF
input datafile fno=00004 name=E:\ORADATA\ORA5\DATA\DATA01\USERS01.DBF
input datafile fno=00002 name=E:\ORADATA\ORA5\DATA\DATA01\UNDOTBS01.DBF
input datafile fno=00003 name=E:\ORADATA\ORA5\DATA\DATA01\SYSAUX01.DBF
channel c1: starting piece 1 at 23.03.10
channel c1: finished piece 1 at 23.03.10
piece handle=01l99etn_1_1 tag=TAG20100323T094735 comment=API Version 2.0,MMS Version 8.1.3.0
channel c1: backup set complete, elapsed time: 00:05:15
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel c1: starting piece 1 at 23.03.10
channel c1: finished piece 1 at 23.03.10
piece handle=02l99f7i_1_1 tag=TAG20100323T094735 comment=API Version 2.0,MMS Version 8.1.3.0
channel c1: backup set complete, elapsed time: 00:00:05
Finished backup at 23.03.10
released channel: c1
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 1.26G SBT_TAPE 00:05:13 23.03.10
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20100323T094735
Handle: 01l99etn_1_1 Media:
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------- ----
1 Full 26436829 23.03.10 E:\ORADATA\ORA5\DATA\DATA01\SYSTEM01.DBF
2 Full 26436829 23.03.10 E:\ORADATA\ORA5\DATA\DATA01\UNDOTBS01.DBF
3 Full 26436829 23.03.10 E:\ORADATA\ORA5\DATA\DATA01\SYSAUX01.DBF
4 Full 26436829 23.03.10 E:\ORADATA\ORA5\DATA\DATA01\USERS01.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 7.00M SBT_TAPE 00:00:04 23.03.10
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20100323T094735
Handle: 02l99f7i_1_1 Media:
Control File Included: Ckp SCN: 26436829 Ckp time: 23.03.10
SPFILE Included: Modification time: 22.03.10
RMAN>
Needless to say that Oracle Test Disk API is not meant to be used in production, thought I found some posts on the net in which some folks are using oracle.disksbt API as a workaround for backup of recovery area to disk; thus avoiding the limitation of mandatory usage of SBT channel for backup of recovery area. I certainly don’t recommend abusing this test API for such workaround.
Posted on 23.03.2010, in Oracle and tagged oracle. Bookmark the permalink. Comments Off on Pseudo tape backup with RMAN.