Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Greg_Pagan
Contributor III
Contributor III

Delete all logs greater than 2 days

Is there a way to do an on demand delete all the log files for all tasks on a RHEL 8 Replicate server that are older than X days?  The end result would be to save some space quickly in the event of an issue with space on the drive.  I know that the log files are not very large but when you have hundreds of tasks with the save timeframe set at 45 days, it does add up.   I can do it with Linux commands and put it into a shell script but I was hoping there was some way to do it in Replicate or QEM that would be easier to construct.  

 

Thanks

 

Labels (2)
1 Solution

Accepted Solutions
john_wang
Support
Support

Hello @Greg_Pagan ,

Regarding the cleanup interval, you may check the "repsrv.log" to verify if the scheduled job was initiated or not, as I remember it will be triggered every 5 minutes.

john_wang_0-1710950510997.png

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!

View solution in original post

5 Replies
john_wang
Support
Support

Hello @Greg_Pagan ,

Thanks for reaching out to Qlik Community!

Yes, we may set the Replicate Server to clean up the log files automatically. Please goto Server --> Logging --> Log File Management and set the cleanup days. A Sample:

john_wang_0-1710947570367.png

Hope this helps.

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
Greg_Pagan
Contributor III
Contributor III
Author

Thanks for the suggestion, sounds promising.. 

If I change the value, when does the clean up of the files run?  I am wondering how long after the change is made until the extra files are removed from the hard drive?

john_wang
Support
Support

Hello @Greg_Pagan ,

If you want to purge the files immediate, you may trigger the delete operation manually by step 1-4:

john_wang_0-1710950134961.png

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @Greg_Pagan ,

Regarding the cleanup interval, you may check the "repsrv.log" to verify if the scheduled job was initiated or not, as I remember it will be triggered every 5 minutes.

john_wang_0-1710950510997.png

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
SushilKumar
Support
Support

Hello @Greg_Pagan 

IF you would like to use Linux then you can achieve the same by using below command.

find /path/to/directory/ -mindepth 1 -mtime +2 -delete

Thanks & Regards,

Sushil Kumar