Get Involved. Join the Conversation.


    Christopher Maggiulli
    Recovering data from an on-demand backup using dbaasapi
    Topic posted May 3, 2019 by Christopher MaggiulliSilver Crown: 22,500+ Points, tagged Backup, DBaaS, Recovery, REST API, Storage 
    131 Views, 4 Comments
    Recovering data from an on-demand backup using dbaasapi


    We are running a production instance of Oracle Integration Cloud Classic (User Managed) v19.2 which uses Oracle DBaaS 12.2 Standard Edition.  Two weeks ago we triggered an action in OIC that unknowningly deleted several process instances from the database.  We want to restore that data into a test database from an oss (storage cloud) production backup.  We have identified the specific rman tag number we absolutely need to use.  We then want to use data pump to import the missing data back into production without overwriting the data we have accumulated since.  

    Side note : We have successfully done this once before and are very comfortable with the process and the data pump script.  


    The specific date / time we need to restore from fell on a day that the automatic nightly backup did not work.  As a result of this, I was taking full database on demand backups.  These backups start with JAAS{DDMMYYY} as opposed to TAG{DDMMYYY}

    Here is what I did.

    1. On the production database (the source of the data) I zipped the tde_wallet and retrieved the dbid

    2. On the test database (the destination) I transfered and unzipped the tde_wallet to /home/oracle/tde_wallet (and set the correct owner and permission bits)

    3. I then created a folder /home/oracle/ibkp and created two files.  begin.json and begin.out.  In begin.json I crafted the following json


      "object": "db",
      "action": "begin",
      "operation": "ibkp",
      "params": {
        "dbname": "ORCL",
        "dbid": "1503781576",
        "oss_url": "",
        "oss_user": "redacted",
        "oss_passwd": "redacted",
        "decrypt_wallet": "/home/oracle/tde_wallet",
        "passwd": "Welcome-1",
        "dbsize": "30GB"
      "outputfile": "/home/oracle/ibkp/begin.out",
      "FLAGS": ""

    I then ran the following command

    dbaasapi -i begin.json


    Output / Status

    After running for a few minutes I then created two more files: status.json and status.out

    In status.json I crafted the following json

      "object": "db",
      "action": "status",
      "operation": "ibkp",
      "id": "1",
      "params": {
        "dbname": "ORCL"
      "outputfile": "/home/oracle/ibkp/status.out",
      "FLAGS": ""

    and ran using dbaasapi -i status.json


    The output is as follows

       "msg" : "",
       "object" : "db",
       "status" : "Failed",
       "errmsg" : "JAAS* tags are not supported. ",
       "outputfile" : "/home/oracle/ibkp/begin.out",
       "action" : "begin",
       "id" : "1",
       "operation" : "ibkp",
       "logfile" : "/var/opt/oracle/log/ORCL/dbaasapi/db/ibkp/1.log"



    I created an SR asking how I can restore this backup and they responded to "use a tag instead" which is very unhelpful (understatement).  Does anyone know what utility I can use to run this recovery?


    I did go into the python/pearl source files for this utility (in /var/opt/oracle/dbaasapi/lib) and ran a grep -ril "JAAS*" * to see if that error message was returned from a service or is a hardcoded check in the code.  It appears to come from the service, however when I ran this same routine and a dbaas machine provisioned a year ago the utility ran (but the box didn't have enough space for the data) which is a bit perplexing


    Any help will be greatly appreciated



    • Christopher Maggiulli

      Any assistance on this would be greatly appreciated.  I created a SR but the response I'm getting is essentially "you can't use a JAAS backup".  But if we can't utilize a JAAS backup in anyway then how is it even a backup at all?

    • Simon Law

      Hi Chris, 

      This is not supported, see this support note for more info: "Replace database from existing backup failed with Error JAAS* tags are not supported. (Doc ID 2521747.1)".

      I would upgrade to the latest tooling and see if it makes any difference, if not then try incremental back up or time based / SCN recovery.


      • Christopher Maggiulli

        Is this true only for the dbaasaapi client?  When I go to provision a new dbaas in the PSM I see the JAAS tag available to provision a  new DB from backup.  However  that functionality (for tags and jaas) never works for me, because the storage container for our production system was created a few years ago and there is some permission issue I couldn't resolve myself or with Oracle support.  

        If I run the following

        sudo -s

        /var/opt/oracle/bkup_api/bkup_api --help


        It shows me options for restoring a JAAS tagged backup.  However, I have never used bkup_api except for forcing a backup to oss from the box that is already connected to OSS.  Can that utility be used to restore a backup from a storage container that it doesnt back up to


    • Simon Law

      Please can you share the SR#? We will work with you offline via support on this issue.