SuSE Syslog-ng log rotate configuration

Hello Expert,

We are encountered one syslog-ng rotate configration,

we have one central syslog-ng server and several clients:

Central syslog-ng server log rotate configuration:

compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2

/syslog/HOSTS///* {
compress
dateext
maxage 365
rotate 365
noolddir
ifempty
sharedscripts
missingok
#tabooext + .bz2
copytruncate
}

we scheduled rotate with crontab and has unexpected rotate result:

-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2-20140910.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2-20140912.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2-20140912.bz2-20140913.bz2
-rw------- 1 root root 0 Sep 15 06:48 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2-20140912.bz2-20140913.bz2-20140914.bz2
-rw------- 1 root root 2288 Sep 15 06:51 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2-20140912.bz2-20140913.bz2-20140914.bz2-20140915.bz2
-rw------- 1 root root 14 Sep 15 06:51 user-20140908.bz2-20140909.bz2-20140910.bz2-20140911.bz2-20140912.bz2-20140913.bz2-20140915.bz2

could you please correct us for the rotate configuration file? thanks.

B.R
Yan da

we want to rotate the syslog-ng logs daily and keep 365 versions, thanks in advances.

B.R
Yan da

From the logrotate.conf manpage:

Please use wildcards with caution.  If you specify *, logrotate will
rotate all files, including previously rotated ones.  A way around this is
to use the olddir directive or a more exact wildcard (such as *.log).


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…