Add new file to rotation:
- copy one of /etc/logrotate.d/* configuration files to working (e.g. home) directory, name it e.g. new-file
- vim new-file
- change path to point to new (existing) file to be rotated
- change other parameters, if needed
- sudo mv new-file /etc/logrotate.d/
- sudo chown root:root /etc/logrotate.d/new-file
Dry run:
logrotate -d /etc/logrotate.d/new-file
sudo logrotate -vf /etc/logrotate.d/new-file
Žiadne komentáre:
Zverejnenie komentára