On 28.11.23 15:23, Arnaud FLORENT via samba wrote:> Hi > > > you could try a file /etc/logrotate.d/samba-local with this content > > > /var/log/samba/log.samba-dcerpcd > /var/log/samba/log.rpcd_classic > /var/log/samba/log.rpcd_winreg > /var/log/samba/log.samba-bgqd > /var/log/samba/log.rpcd_spoolss { > ?? ?weekly > ?? ?missingok > ?? ?rotate 7 > ?? ?compress > ?? ?delaycompress > ?? ?notifempty > }I have: /var/log/samba/log.rpcd_* { weekly missingok rotate 7 postrotate /usr/bin/killall -HUP /usr/sbin/smbd endscript compress delaycompress notifempty } and get "ls" like: log.rpcd_spoolss log.rpcd_spoolss.1 log.rpcd_spoolss.1.1 log.rpcd_spoolss.1.1.1 log.rpcd_spoolss.1.1.1.1 log.rpcd_winreg log.rpcd_winreg.1 log.rpcd_winreg.1.1 log.rpcd_winreg.1.1.1 log.rpcd_winreg.1.1.1.1 log.rpcd_winreg.1.1.1.1.1 log.rpcd_winreg.1.1.1.1.1.1 log.rpcd_winreg.1.1.1.1.1.1.1 log.rpcd_winreg.1.1.1.1.1.1.1.1 log.rpcd_winreg.1.1.1.1.1.1.1.1.1 log.rpcd_winreg.1.1.1.1.1.1.1.1.1.1 log.rpcd_winreg.1.1.1.2.gz log.rpcd_winreg.1.1.2.gz log.rpcd_winreg.1.1.2.gz.1 log.rpcd_winreg.1.1.2.gz.1.1 log.rpcd_winreg.1.1.2.gz.1.1.1 log.rpcd_winreg.1.2.gz log.rpcd_winreg.1.2.gz.1 log.rpcd_winreg.1.2.gz.1.1 log.rpcd_winreg.1.2.gz.1.1.1 log.rpcd_winreg.1.2.gz.1.1.1.1 log.rpcd_winreg.1.2.gz.1.1.1.1.1 log.rpcd_winreg.1.2.gz.1.1.1.1.1.1 log.rpcd_winreg.1.2.gz.1.1.1.1.1.1.1 That doesn't look good / correct to me.
06.12.2023 10:01, Stefan G. Weichinger via samba:> /var/log/samba/log.rpcd_* {> log.rpcd_spoolss > log.rpcd_spoolss.1 > log.rpcd_spoolss.1.1 > log.rpcd_spoolss.1.1.1 > log.rpcd_spoolss.1.1.1.1This seems to be a limitation/defect of logrotate itself. At first you had just log.rpcd_spoolss, and at first logrotate run it rotated it to log.rpcd_spoolss.1, - now you have 2 files - this rotated one and new log.rpcd_spoolss. Now there are two files which are covered by the above mask (log.rpcd_*), - so logrotate will try to rotate both of them. I guess one of the way to handle it is to specify something like log.rpcd_*[^0-9z] (z from .gz or .xz suffix). Or to list all of them explicitly. I'll go the latter way in the next upload of samba debian packages. /mjt