Oracle Secure Backup
In preparation to a possible trip that will never happen I had to go through the configuration steps of Oracle Secure Backup to be able to do it quickly and professionally on-site.
Since I didn’t have a spare tape library to play with I used a built-in tape drive from D240 box and SF6900 as my test bed.
First, I had to configure my tape drive by setting sgen driver since st is not supported by OSB.
# update_drv -d -i '"scsiclass,01"' st # add_drv -f -m '* 0666 bin bin' -i '"scsiclass,01" "scsiclass,08" "scsa,01.bmpt" "scsa,0.8.bmpt"' sgen # ln -s /dev/scsi/sequential/c9t6d0 /dev/obt0
Next step is to create a host and assert is a few roles.
ob> mkhost -r admin,mediaserver,client -i server's_ip_address hostname ob> lshost sf6900-2 admin,mediaserver,client (via OB) in service
Once the host is defined it’s time to proceed wit the tape drive:
ob> mkdev -t tape -o -a sf600:/dev/obt0 tc-tape ob> lsdev tc-tape: Device type: tape Model: [none] Serial number: 0005306351 In service: yes Automount: yes Error rate: 8 Query frequency: [undetermined] Debug mode: no Blocking factor: (default) Max blocking factor: (default) UUID: 907cedda-ad0e-102d-a8d3-d67ad710fa01 Attachment 1: Host: sf6900 Raw device: /dev/obt0
It’s required to bind an OSB’s user to a unix account so that OS’s user would be able (authorized) to start a backup using RMAN:
ob> chuser --preauth sf6900:system_username+rman admin
In the end created a database backup storage selector and media family using mkssel and mkmf respectively to add more granularity into my backup configuration i.e. “Write window”, “Keep volume set” period or whether the volumes are appendable or not.
Finally, I used the following trivial RMAN script to make sure that everything was fine:
run { allocate channel c1 device type sbt parms 'ENV=(OB_MEDIA_FAMILY=OracleBackup)'; backup database include current controlfile; backup archivelog all not backed up; }
To be on the safe side just used obtool to confirm that everything was indeed alright:
ob> lsj Job ID Sched time Contents State ---------------- ----------- ------------------------------ --------------------------------------- admin/3 none database orcltst (dbid=1449400826) processed; Oracle job(s) scheduled admin/3.1 none datafile backup running since 2010/11/02.17:06 ob> lspiece POID Database Content Copy Created Host Piece name 101 orcltst full 0 11/02.17:07 sf6900 02ls0ppf_1_1 102 orcltst archivelog 0 11/02.17:09 sf6900 03ls0pua_1_1