Recover Backups Using the dbaasapi Utility

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

  1. Connect as the opc user to a compute node that is associated with the database deployment.
  2. Start a root-user command shell:
    $ sudo -s
    #
  3. Create a JSON input file with the required recovery command parameters. For example:
    {
        "action": "start",
        "object": "db",
        "operation": "recover",
        "outputfile": "output-file",
        "params": {
             "dbname": "dbname",
             "cfgfiles": "yes",
             "bkup_tag": "backup-tag"
        }
    }

    Where valid values in the params tag are:

    • "dbname": "dbname" — specifies the name of the database being recovered.
    • "cfgfiles": "yes" — optionally specifies that you want to recover the system and database configuration files. By default, configuration files are not recovered.
    • One of the following recovery types must also be specified:
      • "latest": "yes" — recovers the latest available backup.
      • "bkup_tag": "backup-tag" — recovers the backup having the specified backup-tag.
      • "scn": "SCN" — performs a point in time recovery to the specified system change number (SCN).
      • "timestamp": "timestamp" — performs a point in time recovery to the specified timestamp. The timestamp value must be UTC and of the format dd-MMM-yyyy HH:mm:ss.
  4. Restore the backup and perform recovery using the orec subcommand of the dbaascli utility:
    # /var/opt/oracle/dbaasapi/dbaasapi -i input-file.json

    The restoration and recovery process performs these steps:

    • Shut down the database

    • Extract and restore configuration files, if "cfgfiles": "yes" was specified

    • Prepare for recovery

    • Perform the recovery

    • Restart the database after recovery

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