How to access internal OCI DBaaS backup Object Storage bucket

This article will show how can you access the data that oracle stores in the internal hidden buckets, mainly used for "*aaS" backups.

Update: Oracle has now an official tool for that: MV2BUCKET. It's fully supported and available in the MOS note below. Consider using it instead of the manual approach:

Hope it helps.

Have you enjoyed? Please leave a comment or give a 👍!

10 comments

Skip to comment form

    • Ramsankar Cheruvattath on October 5, 2020 at 17:24
    • Reply

    Super cool! Thanks for sharing!

    • Andre Son on October 6, 2020 at 03:56
    • Reply

    This is very helpful, you're a champ. Thanks so much for doing the research and posting this.

    • oracle dba on October 6, 2020 at 10:51
    • Reply

    So with that information, would it be possible to retrieve an object from this object store, like download a backup piece (or any other file on the internal object store) to disk?

    1. Absolutely. Take a look in the REST API: https://docs.openstack.org/api-ref/object-store/. Instead of using CURL to list the object contents, you can use it to download (or even change/upload) single pieces.

      Regards,
      RJ

    • Jeroen Hermans on October 7, 2020 at 13:07
    • Reply

    Hi Rodrigo Jorge,

    You just made my life so much easier. I now have the information in the "hidden" backup bucket.
    Now we can see what storage we are using.
    Many, many thanks.
    Andre Son gave me directions to this webpage. I am going to read more posts on this site.

    (bow)(bow)(bow)(bow)(bow)(bow)

    Jeroen Hermans

    • Michael Fontana on October 14, 2020 at 16:09
    • Reply

    Incredible stuff, Rodrigo! You are such an asset for anyone working with OCI. There are so many pieces missing!

    • Mark on January 21, 2021 at 16:22
    • Reply

    Question: What if the DB has been purged/terminated, while the DB backups have not. How would one go about that?

  1. Obrigado, RJ!
    O artigo me ajudou aqui, mas no DB System que eu precisei, a wallet não estava com AUTOLOGIN e exigiu a senha.

    Segue o caminho alternativo que eu consegui para obter a senha:
    Quando o arquivo "cwallet.sso" não existe no diretório, o DCS Agent vai reconfigurar o backup, e nessa etapa ele cria um arquivo oculto, temporariamente, no home do usuário oracle.
    Esse arquivo contém usuário e senha para acessar o bucket.

    A) Remova o arquivo "cwallet.sso" do diretório:
    $ mv cwallet.sso cwallet.sso-bkp

    B) Sessão ssh 1: Vá para /home/oracle conectado com o usuário root:
    # cd /home/oracle

    C) Sessão ssh 2: Abra uma segunda sessão com usuário root e monitore quando o DCS agent gerar algum arquivo contendo o o texto "opciargfile":
    # cd /opt/oracle/dcs/log/
    # tail -f dcs-agent.0.0.log | grep opciargfile

    D) Sessão ssh 3: Execute um novo backup via console ou dbcli, exemplo disparando ARCHIVELOG (dbname=CDB1)
    # dbcli create-backup -bt ARCHIVELOG -in CDB1

    Atenção:
    E) Sessão ssh 1: Quando a sessão ssh 2 atualizar, faça um backup do diretório oculto que foi gerado em /home/oracle:
    Exemplo em que o DCS agent gerou um diretório chamado ".opciargfiledir_2021-04-20_11-50-28.0283"
    # cp -r opciargfiledir_2021-04-20_11-50-28.0283 wallet

    O arquivo dentro dessa pasta terá as seguintes informações:
    -opcId
    -opcPass
    -walletDir
    -configFile
    -container

    Então é só usar:
    export v_user= -opcId
    export v_pass= -opcPass
    export v_container= -container

  2. Nice thorough explanation and post.

    Can you explain why, if I restore a DBaaS database via the console, it also restores all OS packages to default configuration and removes custom packages we have implemented (for DNS, AD, etc).

Leave a Reply

Your email address will not be published.