FS#5980 - samba logrotate file creates recursive log names
Attached to Project:
Arch Linux
Opened by Dan McGee (toofishes) - Monday, 11 December 2006, 04:01 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 25 October 2007, 13:00 GMT
Opened by Dan McGee (toofishes) - Monday, 11 December 2006, 04:01 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 25 October 2007, 13:00 GMT
|
Details
[root@dublin samba]# ls
cores log.nmbd log.nmbd.1 log.nmbd.1.1 ... log.smbd log.smbd.1 log.smbd.1.1 log.smbd.1.1.1 log.smbd.1.1.1.1 ... This is due to this line being in the logrotate configuration file: /var/log/samba/log.* { It needs to be rectified somehow to rotate only those that do not end in a number already. With the current settings these old logs are never deleted and could potentially overflow space constraints in /var/log. Perhaps since there are only two log files (at least in my system, I do not know if this is always true) it can be changed to list both: /var/log/samba/log.nmbd /var/log/samba/log.smbd { |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Thursday, 25 October 2007, 13:00 GMT
Reason for closing: Fixed
Additional comments about closing: 3.0.26a-4 package
Thursday, 25 October 2007, 13:00 GMT
Reason for closing: Fixed
Additional comments about closing: 3.0.26a-4 package
log file = ...../log.%m
where a machine name is appended onto the log.
You can end up with log.192.168.1.1
Which will end up being a series of n log files after n series of logrotations. If it always logged hostnames, you could easily discern which files to rotate or not, but alas. There can be no guarantee that you will not see a valid log non-rotated logfile not ending in .X where X is an integer.
the easy solution might be to change the line in the smb.conf to something else.
perhaps...
log file = /var/log/samba/%m.log
Then you can have your smb logrotate script be..
/var/log/samba/log.{smbd,nbmd} /var/log/samba/*.log {
... original logrotate section ...
}
This is what I have done for my logrotate and samba setup.
This one works... i was typing from memory, instead of looking at my modified logrotate script.
heh..
/var/log/samba/log.smbd /var/log/samba/log.nbmd /var/log/samba/*.log {
It is "log.nmbd" and not "log.nbmd".