Is there a way using logrotate I can rotate entire directory and compress it instead of just the files in a particular directory? I tried experimenting using the config below but that does not work. Give the error message below:
Config:
/path/to/folder/test {
daily
rotate 5
missingok
compress
delaycompress
}
Error:
$logrotate -vf test.conf
reading config file test.conf
reading config info for /path/to/folder/test
Handling 1 logs
rotating pattern: /path/to/folder/test forced from command line (5
rotations)
empty log files are rotated, old logs are removed
error: error creating unique temp file: Permission denied