Unanswered: Unix script to move DB2 log_archive files to TSM
I am new to DB2. We have the requirement move log_archive files move to Tivoli storage system through script and reatain only last 8 hrs log files only in log_archive file system. Once moved before 8 hours off line log files to TSM those files should be delete in log_archive filesystem.
From you message it looks like you have 2 different requirements:
1. archive logs to tsm
Not sure why you would script this. TSM works great with DB2 and with minimal effort you can have db2 automatically archive the logs to TSM (look at logarchmeth1, logarchopt1 etc). There are numerous manuals on this s subject.
2. Retain a local copy of archive logs for 8 hours
Create a new file system and use the logarchopt2 option to use this as your destination. Then you can easily create a script to delete files from this file system that are over 8 hours old.