# SuSE Syslog-ng log rotate configuration

**URL:** <https://forums.suse.com/t/suse-syslog-ng-log-rotate-configuration/26080>\
**Category:** SLES Configure-Administer\
**Created:** [September 15, 2014, 5:43am UTC](https://forums.suse.com/t/suse-syslog-ng-log-rotate-configuration/26080 "2014-09-15T05:43:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaman123](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@shaman123](https://forums.suse.com/u/shaman123)\
**Post date:** [September 15, 2014, 5:43am UTC](https://forums.suse.com/t/suse-syslog-ng-log-rotate-configuration/26080/1 "2014-09-15T05:43:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shaman123](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@shaman123](https://forums.suse.com/u/shaman123)\
**Post date:** [September 15, 2014, 8:34am UTC](https://forums.suse.com/t/suse-syslog-ng-log-rotate-configuration/26080/2 "2014-09-15T08:34:25Z")

</div>

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

B.R  
Yan da

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [September 15, 2014, 2:14pm UTC](https://forums.suse.com/t/suse-syslog-ng-log-rotate-configuration/26080/3 "2014-09-15T14:14:47Z")

</div>

From the logrotate.conf manpage:

```auto
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…
