Collecting trail files from OCI GoldenGate Service (#GGS)

oci ggs trail files bridge

As a GoldenGate administrators start to explore how to perform replication tasks within a cloud environment, they will start to ask how can I get to the underlying trail files if I need to review them?  After all having access to the underlying data is key to troubleshooting when something happens.  In normal GoldenGate environments this is pretty straight forward because you have access to the host where GoldenGate is running.  This would be the approach if you are running Oracle GoldenGate on compute nodes in AWS, Azure, GCP, or OCI.  With Oracle GoldenGate Service (GGS), this takes a bit of a different approach – after all GGS is a “service” and does not allow access to the underlying host operating system.  How do you get the trail files needed then?

Within the GoldenGate architecture, under Microservices, the trail files are located in the $OGG_VAR_HOME/lib/data directory.  In a normal, non-services, environment, getting this directory is pretty easy.  In GGS, it proves to be a bit more difficult.  Hopefully, this post will help many understand how they can retrieve the trail files they are looking for.

Manual Backup

The first thing that has to be done is perform a “manual backup” of the GGS deployment.  Within OCI, you first have to get to the GoldenGate Deployment that is running.  Once you are at the deployment, under Resources – you will find a section called Deployment Backups.  

 

oci ggs deployment backups resources

 

After clicking on Deployment Backups, you are then taken to the bottom of the page where all the backups are listed.  In this list of backups, you will see a lot of automated backups.  In order to get to the trail files that we need, you’ll need to create a manual backup.  This can be achieved by using the Create Backup button at the top of the section.

oci ggs deployment compartment

We will not be going into how to create the manual backup, but know that you have to create a manual back up in order to get to the trail files. In the image above, we performed a manual backup a few days ago so we already have a back we can use.  At the same time take a look at the size of the manual backup compared to the automatic backups.  The automatic backups are significantly smaller compared to the manual backups.  This is because the manual backups are pulling everything in the deployment. What we mean by this is that, the directory structure of the manual backup looks similar to the following:

  • bin
  • cfgtoollogs
  • deinstall
  • diagnostics
  • include
  • install
  • inventory
  • jdk
  • jlib
  • lib
    • instanceclient
    • sql
    • utl
  • OPatch
  • oraInst.loc
  • oui
  • srvm

Plus the $DEPLOYMENT_HOME ($OGG_ETC_HOME & $OGG_VAR_HOME) information.  This is why the manual backups are significantly larger than the automatic backups.  

Now that manual back up complete, the zip file can be downloaded to your machine after you view it on the details page for the backup.  In the image below, we have highlight want you need to be looking for in order to download the zip file.

oci ggs manual backup details

After clicking the download link, the zip file will be downloaded a location on your machine.  Once downloaded you now have all the trail files on your local machine.  

Unzipping the Trail Files

With the zip file downloaded, you will try to unzip the file.  A bit of warning here – depending on how often you purge trail files; unzipping the file may take up to 3 times the space on your machine once unzipped.  

Note: What is not documented in the notes for GoldenGate Service is that the downloaded zip file is compressed as a “xf” file.  Meaning that WinZip may not be able to open it – atleast on MacOS that was the case.

In order to unzip the trail files, on Mac, we need to use two different unzip utilities.  These utilities were:

  • Unzip – RAR ZIP 7Z Unarchiver.app
  • Archive Utility.app

Although we have WinZip for Mac installed, these two utilities allowed us to quickly unzip file manual backup.

After unzipping

After the file(s) are unzipped with the utilities mentioned, you will have a directory that is named after the zip file.  Within this directory, you will have two directories called Deployment and ServiceManager.  All the trail files will be located in the data directory (i.e. $OGG_VAR_HOME/lib/data).  From here you can move the trail file needed and use Oracle GoldenGate’s logdump utility to review the files.

oci ggs manual backup directory

At the end of the day, Oracle has built a pretty decent version of Oracle GoldenGate Service within the OCI framework.  At the same time, there is room for improvement in order to help GoldenGate Administrators to troubleshoot easier would be a huge bonus.  Until then, if you need to get to a trail file, your only choice is to do a full manual backup of the deployment, download that backup, and extract what you needed.

Please follow and like:

Leave a Reply

Your email address will not be published. Required fields are marked *

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.