Hands-on task
Rotating the orders log
The shop writes orders to /var/log/shop/orders.log, and after a week of testing the log has already grown. Create a logrotate config /etc/logrotate.d/shop: rotate when the file is bigger than 2M, keep 5 old copies, compress them, and create a new empty log after rotation.
- logrotate
- size
- rotate
- compress
- create