This is the fourth and final post of a multi-part blog series walking through how to copy your TDE encrypted on premise Oracle Database to an OCI instance in the oracle cloud. This blog post will focus on how to restore your database from the object store, when the backup pieces are not available from your controlfile.
There a few reasons why this might be the case.
- The backups were written to the ZDLRA directly.
- You are using an RMAN catalog, and they have aged off the controlfile.
- They are "keep" backups which will be stored in the RMAN catalog.
- You had to rebuild the controlfile, and lost history of backups.
- odbsrmt.py --> python script to manage the contents of the object store bucket
- python_readme.txt --> Documentation for how to use the above python script.
Step #1 Execute odbsrmt.py to get a listing of your backup pieces.
[oracle@oracle-19c-test-tde lib]$ python2 odbsrmt.py
usage: odbsrmt.py [-h] --mode
{report,rman-listfile,garbage-collection,delete,recall}
[--ocitype {classic,swift,bmc,archive}]
[--credential CREDENTIAL] [--token TOKEN] --host HOST
[--base BASE] [--forcename FORCENAME]
[--format {text,xml,json}] [--dbid DBID]
[--container CONTAINER] [--dir DIR] [--prefix PREFIX]
[--untildate UNTILDATE] [--exclude_deferred]
[--thread THREAD] [--proxyhost PROXYHOST]
[--proxyport PROXYPORT] [--tocid TOCID] [--uocid UOCID]
[--pubfingerprint PUBFINGERPRINT] [--pvtkeyfile PVTKEYFILE]
[--skip_check_status] [--debug]
odbsrmt.py: error: argument --mode is required
python2 odbsrmt.py --mode report --ocitype bmc --host https://objectstorage.us-ashburn-1.oraclecloud.com --dir /home/oracle/ocicloud/report --base mydbreport --pvtkeyfile /home/oracle/ocicloud/myprivatekey.ppk --pubfingerprint 6d:f9:57:d5:ff:b1:c0:98:81:90:1e:6e:08:0f:d0:69 --tocid ocid1.tenancy.oc1..aaaaaaaanz4trskw6jm57cz2fztoasatto3i6z4h33gzfb3pmei5vvnoq --uocid ocid1.user.oc1..aaaaaaaae2mlwyke4gvd7kzxv5zxgg3k2dlcwvubv7vjy6jvbgsaouxq --container migest_backups --dbid 301925655
FileName
Container Dbname Dbid FileSize LastModified BackupType Incremental Compressed Encrypted
220h9q5f_66_1_1
migest_backups OCITEST 301925655 72876032 2021-12-21 19:37:33 ArchivedLog false true true
230h9q5g_67_1_1
migest_backups OCITEST 301925655 75759616 2021-12-21 19:37:32 ArchivedLog false true true
240h9q5g_68_1_1
migest_backups OCITEST 301925655 54263808 2021-12-21 19:37:12 ArchivedLog false true true
250h9q5g_69_1_1
migest_backups OCITEST 301925655 48496640 2021-12-21 19:36:58 ArchivedLog false true true
260h9q9n_70_1_1
migest_backups OCITEST 301925655 159645696 2021-12-21 19:42:46 Datafile true true true
270h9q9n_71_1_1
migest_backups OCITEST 301925655 408682496 2021-12-21 19:47:04 Datafile true true true
280h9q9n_72_1_1
migest_backups OCITEST 301925655 524288 2021-12-21 19:37:46 Datafile true true true
290h9q9n_73_1_1
migest_backups OCITEST 301925655 56885248 2021-12-21 19:39:37 Datafile true true true
2a0h9q9v_74_1_1
migest_backups OCITEST 301925655 235667456 2021-12-21 19:45:05 Datafile true true true
2b0h9qdi_75_1_1
migest_backups OCITEST 301925655 233832448 2021-12-21 19:46:18 Datafile true true true
2c0h9qjb_76_1_1
migest_backups OCITEST 301925655 52166656 2021-12-21 19:44:31 Datafile true true true
2d0h9qmk_77_1_1
migest_backups OCITEST 301925655 1572864 2021-12-21 19:44:43 Datafile true true true
2e0h9qn3_78_1_1
migest_backups OCITEST 301925655 34865152 2021-12-21 19:45:41 Datafile true true true
2f0h9qns_79_1_1
migest_backups OCITEST 301925655 524288 2021-12-21 19:45:20 Datafile true true true
2g0h9qrg_80_1_1
migest_backups OCITEST 301925655 262144 2021-12-21 19:47:14 ArchivedLog false true true
c-301925655-20211221-00
migest_backups OCITEST 301925655 524288 2021-12-21 19:47:22 ControlFile SPFILE false true true
Total Storage: 1.34 GB
report file used for catalog scripts : mydbreport4701.lst
catalog device type 'sbt_tape' backuppiece '220h9q5f_66_1_1';
catalog device type 'sbt_tape' backuppiece '230h9q5g_67_1_1';
catalog device type 'sbt_tape' backuppiece '240h9q5g_68_1_1';
catalog device type 'sbt_tape' backuppiece '250h9q5g_69_1_1';
catalog device type 'sbt_tape' backuppiece '260h9q9n_70_1_1';
catalog device type 'sbt_tape' backuppiece '270h9q9n_71_1_1';
catalog device type 'sbt_tape' backuppiece '280h9q9n_72_1_1';
catalog device type 'sbt_tape' backuppiece '290h9q9n_73_1_1';
catalog device type 'sbt_tape' backuppiece '2a0h9q9v_74_1_1';
catalog device type 'sbt_tape' backuppiece '2b0h9qdi_75_1_1';
catalog device type 'sbt_tape' backuppiece '2c0h9qjb_76_1_1';
catalog device type 'sbt_tape' backuppiece '2d0h9qmk_77_1_1';
catalog device type 'sbt_tape' backuppiece '2e0h9qn3_78_1_1';
catalog device type 'sbt_tape' backuppiece '2f0h9qns_79_1_1';
catalog device type 'sbt_tape' backuppiece '2g0h9qrg_80_1_1';
catalog device type 'sbt_tape' backuppiece 'c-301925655-20211221-00';