'How to delete old executions and jobs from rundeck
I am having more than 30000 jobs and executions in my rundeck. Is there any API or CLI so that we can schedule to clean periodically. Because of too many jobs and executions rundeck throws java.lang.OutOfMemoryError: GC Overhead Limit and the services gets stops.
Also if there are more number. The UI takes long time to render the information.
Any documentations or scripts will be helpful.
Solution 1:[1]
Using RD CLI you have this good option. So, if you're using Rundeck 3.1 or above, you can go to Project Settings > Edit Configuration > Execution History Clean (tab) and click on "Enable" checkbox (then you can define the parameters in the same page).
More info here.
Solution 2:[2]
if your project is only one, you don't have to run the above script.
Go to Projects, Click on recent or failed or running tab and do a bulk delete
Solution 3:[3]
If your looking to delete the log in Rundeck Server cli, You can find the log details in below location,
Log location : /var/log/rundeck/, /var/lib/rundeck/logs/rundeck/\*/job/\*/logs
Cmd to Clean the logs more the 90 days,
sudo find /var/lib/rundeck/logs/rundeck/\*/job/\*/logs -mtime +90 -delete
sudo find /var/log/rundeck/ -type f -mtime +90 -delete
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | unknownerror |
| Solution 3 | AEM |
