Environment
Objective
Create a cron job to clear out binary files older than a set date.
Resolution
- Edit /etc/cb/cron/cb.cron.template
- Add the following above the last comment in the file
- Save the file
- Restart services for the change to take effect
Additional Notes
- Actions must be run as a root user or with sudo privileges
- Binary metadata will still exist in the environment.
- Without intervention, binary files will never be removed from the server.
- Removing binary files can result in a situation where an endpoint has reported on a binary, but the file is not available. This happens when the binary had already been seen on the endpoint previously. Once a sensor reports on a binary, it will not try to upload the binary on consecutive interactions. The number of days old for the binary should be relatively high to reduce this edge case
Related Content