From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.67) (envelope-from ) id 1IGyWl-0003ie-LG for garchives@archives.gentoo.org; Fri, 03 Aug 2007 14:53:20 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l73Epv91031543; Fri, 3 Aug 2007 14:51:57 GMT Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l73ElgSD026730 for ; Fri, 3 Aug 2007 14:47:42 GMT Received: by ug-out-1314.google.com with SMTP id a2so529035ugf for ; Fri, 03 Aug 2007 07:47:41 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KNE3vA5YGT7BjSV5OAa5Nd/oNPN4WfXaqD1eMq8NDVaRkdC17gsX/OZuk43myLZl2rInblmLR9gdklCl+dUZxrArZ1kBE2tLFxA1g1kbhmihAPGnQ3+7NY1X113h0ZPph7ODfvkgJkyqzWJhtlegB/P4nsjUXwemqxBKsmYmvQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KKIgop7FujKc7g+aQm5ITnBFKs6yS7TLTI4DRF5Mgw0K8vgYWGm1CzB+VD2YHuv95qSRgfZSFBer/uh3wyH3zKC79Blf+C9DG4DB2x4+KKOElqIoh7eaZ7urwbJw92+ty9poY4mimOza0zNVOyaS9B1x98Zxph3EpX2sxTdpu6I= Received: by 10.78.183.15 with SMTP id g15mr847075huf.1186152461336; Fri, 03 Aug 2007 07:47:41 -0700 (PDT) Received: by 10.78.51.20 with HTTP; Fri, 3 Aug 2007 07:47:41 -0700 (PDT) Message-ID: <50ba04d20708030747w352c45a3t5997d1c8102b8eac@mail.gmail.com> Date: Fri, 3 Aug 2007 16:47:41 +0200 From: "Matthias Guede" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] logrotate desn't create new empty files In-Reply-To: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Archives-Salt: 4049a96e-5175-45c0-a3c2-c155a14ea36f X-Archives-Hash: d755b9abcba6d92c302699d8520ef9e0 2007/8/3, Jakob : > Hi all, > > I'm running logrotate on my homeserver and the logs are rotated > correctly but after rotating it should create new empty log files and > that doesnt work. > > here are my confs: > /etc/logrotate.conf: > # $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v > 1.2 2004/07/18 01:58:24 dragonheart Exp $ > # > # Logrotate default configuration file for Gentoo Linux > # > # See "man logrotate" for details > > # rotate log files weekly > weekly > #daily > > # keep 4 weeks worth of backlogs > rotate 10 > > # create new (empty) log files after rotating old ones > create > > # uncomment this if you want your log files compressed > compress > > # packages can drop log rotation information into this directory > include /etc/logrotate.d > > notifempty > nomail > noolddir > > # no packages own lastlog or wtmp -- we'll rotate them here > /var/log/wtmp { > monthly > create 0664 root utmp > rotate 1 > } > > # system-specific logs may be also be configured here. > > and /etc/logrotate.d/syslog-ng: > # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v > 1.2 2004/07/18 02:25:02 dragonheart Exp $ > # > # Syslog-ng logrotate snippet for Gentoo Linux > # contributed by Michael Sterrett > # > > /var/log/messages { > dateext > olddir /var/log/ > copy > create 0600 root root > size 5000k > sharedscripts > postrotate > /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true > endscript > } > > I thought create will do this but it doesn't work and my logs getting > bigger and bigger. > What did I do wron? > > Regards > > Jakob > -- > gentoo-user@gentoo.org mailing list > > from LOGROTATE(8): Here is more information on the directives which may be included in a logrotate configuration file: [...] copy Make a copy of the log file, but don't change the original at all. This option can be used, for instance, to make a snapshot of the current log file, or when some other utility needs to truncate or pare the file. When this option is used, the create option will have no effect, as the old log file stays in place. -- gentoo-user@gentoo.org mailing list