From: Jo R. <jr...@sv...> - 2006-09-22 20:07:42
|
> > In response to Kern Sibbald <ke...@si...>: > > > If you are talking about cycling a Job report log file as defined in the > > > Messages resource, then there is probably no need to SIGHUP Bacula as it > > > opens and closes the log file on a Job by Job basis, if I am not mistaken. > On Tuesday 19 September 2006 20:26, Bill Moran wrote: > > That's what I meant. Although I'm still a bit concerned. What happens if > the > > log file is rotated while a job is in progress? Will bacula attempt to > append > > to the end of (the now compressed) previously opened file descriptor? Or > will > > it reconnect to the new file with the correct filename. On Tue, Sep 19, 2006 at 08:33:13PM +0200, Kern Sibbald wrote: > No, that is what Windows probably does. On Unix/Linux systems, Bacula > continues writing to the old file and when Bacula releases the file, it is > deleted. Thus you lose the last part of what Bacula is writing if you delete > it out from under Bacula. Bill, you canconfigure newsyslog on FreeBSD to rotate the file. My reading of newsyslog.c do_rotate() is that it renames the file. So all you have to do is disable compression of the archived log. Bacula will continue writing to the old log until the current job is finished, and then start writing to the new one for the new job. You could also install the logrotate port, and there are flags to tell it to compress the file the next time logrotate runs. This will handle bacula logfiles just dandy. /var/log/bacula.log { rotate 7 daily delaycompress create 770 bacula bacula } -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation |