Clearing the cache

Previous topic - Next topic

Maciej Mieczakowski

Hi,

I'd like to check with you if my approach for clearing the cache is a good one in scenario when you want to keep the systemlog information untouched.

We received a big batches of data with wrong segment date for dozens of applications (set for 2050 and later) that we did not noticed . It caused that we have really much separate directories in /arscache dir keeping that data. Due to our policy we will keep that data in Ondemand (TSM), but I want to get rid of it from cache. I know I could run arsmaint -c for certain applications with future date (param -t )but it takes really long to process every single application this way.

What I was thinking is to start with cache from scratch, but I'd also like to keep systemlog's daily log for last 2 years untouched. To do this I want to copy all links from /arscache/retr/SL and all data they points to. Copy it to another destination, and remove all data in /arscache dir. After all I would recover retr for SL and data for those links as well.

Is that a good approach or is there a better way to do this? Did I missed anything?

I'm looking for your comments  ;)

Justin Derrick

Get the list of AGIDs that had the bad data:

db2 -x "select agid_name from arsag where name in ('AppGroup1','AppGroup2') >ListOfAGs.txt


Alternately, go into /arscache/cache1/retr and do this to clear out EVERYTHING, except the System Log:

ls -1 ??? >ListOfAGs.txt
  That's Ell, Ess, Space, Dash, One, Space, Question, Question, Question, just for clarity's sake.

Once you have your list:

for i in `cat ListOfAGs.txt`
do
  rm -r /arscache/cache1/*/$i
  rm -r /arscache/cache2/*/$i
  # And so on...
done



That'll clear out (anything that has the bad data/everything), one AG at a time.

You use this code at your own risk!

Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Maciej Mieczakowski

Thanks!  ;)
I know how to do this, I just wanted to make sure my approach is correct. Thanks for your explanation JBNC :)