Typically, when working Oracle Secure Backup / libopc you should in general have an RMAN Catalog. Just to be on the safe side. But what if you do not have it and would like to just catalog all backups in OSS Bucket as you could do with CATALOG START WITH? It is not possible to do CATALOG START WITH for the device SBT_TAPE.

But there is hope – oracle allows you to do „CATALOG DEVICE_TYPE ’sbt_tape‘ BACKUPPIECE ‚xxxx'“ – you „just“ need to know the names of all backup pieces…

Luckilly the repository structure is not as complicated as one could think and it is pretty simple to get all piece names out of Oracle Object Storage (OSS) in a script-friendly matter.

You would need to have the OCI Commandline tool configured (~/.oci/config – see docs) and jq installed.

with configured oci cli, just enter the following command as one line:

oci os object list --all -bn  | jq -r '.data[].name|select(test("sbt_catalog.*"))|split("/")[1]|("catalog device type '\''sbt_tape'\'' backuppiece '\''"+.+"'\'';")' > catalog-backup.sql

Then feed the generated script into RMAN, ideally inside a run block (for performance). Works fastest with PARALLELISM on SBT_TAPE configured to 1.

rman target /
RMAN> RUN {
@catalog-backup.sql
}
...
RMAN> list backup summary;

It should be easily possible to adjust the JQ code to work with AWS S3 Object Store and OSB module.

Alle Beiträge von Bartlomiej Sowa

Solution Architect specialized in Cloud Solutions, Dev(Sec)Ops and large scale automation using Ansible/AWX. Additionally Oracle DBA with very strong background as System Administrator with excellent Unix/Linux OS knowledge covering aspects from system architecture, InfrastructureAsCode (Ansible, Terraform, Pipelines), to network security, shell scripting, Perl, ANSI C, VCS (primary Git, but worked with Clearcase, CVS, SVN). With very high security standards regarding data-, network and even physical security.

Schreibe einen Kommentar