Recover Backups Using the dbaasapi Utility


Starting with version 18.4.6, the default behavior of the recover operation changed. The command now recovers only the data and not the configuration files. Specifiy the -cfgfiles option to also recover configuration files.

You can use the dbaasapi utility to restore backup files and perform complete recovery on a database deployment hosting a single-instance database:

  1. Connect as the opc user to the compute node.
  2. Start a root-user command shell:
    $ sudo -s
  3. Create a JSON input file with the command parameters. For example:
                        "action": "start",
                        "object": "db",
                        "operation": "recover",
                        "outputfile": "recovery.out",
                        "params": {
                            "dbname": "<dbname>",
                            "cfgfiles": "yes",
                            "bkup_tag": "TAG20190219T005048"

    Where valid values in the params tag are:

    • dbname is required for Exadata systems
    • cfgfiles optionally specifies whether you want to recover the configuration files. By default, configuration files are not recovered.
    • Valid recovery types include:
      • latest specifies the latest available backup
      • bkup_tag specifies the tag of the target backup
      • scn specifies the System Change Number of the target backup
      • timestamp specifies the target timestamp of the target backup. The timestamp must be UTC and of the format dd-MMM-yyyy HH:mm:ss
  4. Restore the backup and perform complete recovery using the orec subcommand of the dbaascli utility:
    # /var/opt/oracle/dbaasapi/dbaasapi -i <inputFileName>.json

    The restore and recover process performs these steps:

    • Shuts down the database

    • Extracts and restores configuration files, if "-cfgfiles":"yes" was specified

    • Prepares for recovery

    • Performs the recovery

    • Restarts the database instance after recovery

  5. Exit the root-user command shell:
    # exit