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

Schreibe einen Kommentar