How to determine which DB2 logs can be purged via snapshot metadata?

  • 0
  • 1
  • Question
  • Updated 3 weeks ago
  • Answered
I am currently testing the new ability to ingest DB2 LUW logs in the newest version of Delphix.  I am having trouble telling which logs can be purged after a snapshot though.  If I purge all the logs that were present at the time of the snapshot, it doesn't seem to ingest the next set of logs correctly.  If I put those logs back in place then it seems to work.  

From the documentation it says:

Logs can be purged from your log location after the snapshot operation. The Toolkit will preserve the list of logs which are eligible for purging in the snapshot's metadata. The snapshot metadata can be accessed via the Delphix CLI or API.

My question is, how do I go about accessing this information?  This isn't something I have done before.

Thanks
Jim
Photo of Jim Larsen

Jim Larsen

  • 624 Points 500 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of Jim Larsen

Jim Larsen

  • 624 Points 500 badge 2x thumb
I think I found my answer.

You have to log into the CLI, then cd to snapshots.  From there select that snapshot you want to view and then in the metadata attribute there is an attribute called listLogPurge which contains a list of the log files that can be purged.


Photo of MichaelT

MichaelT, Official Rep

  • 2,124 Points 2k badge 2x thumb
Hi Jim,
I can confirm that the listLogPurge attribute does contain the list of those logs that can be purged. 

Nicely done, sir.

Michael
Photo of Jim Larsen

Jim Larsen

  • 624 Points 500 badge 2x thumb
If I wanted to build clean-up in to the post script hook, I can do that via the CLI or API I assume, but will I have to supply the login information inside that script?
Photo of Hemant Gairola

Hemant Gairola

  • 80 Points 75 badge 2x thumb
I would like to answer the query.
You can use either CLI or API to remove the logs. You need to provide login information to access the metadata.

Another way to achieve the same is :
1. Create a bash script on your staging host and provide the login information into it.
2. Execute the bash script using post-Hook.
Photo of MichaelT

MichaelT, Official Rep

  • 2,124 Points 2k badge 2x thumb