From owner-freebsd-questions@FreeBSD.ORG Sun Jan 23 14:10:21 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDD8C106566B for ; Sun, 23 Jan 2011 14:10:21 +0000 (UTC) (envelope-from gpeel@thenetnow.com) Received: from constellation.thenetnow.com (constellation.thenetnow.com [207.112.4.14]) by mx1.freebsd.org (Postfix) with ESMTP id C68AA8FC0A for ; Sun, 23 Jan 2011 14:10:21 +0000 (UTC) Received: from hpeel.ody.ca ([216.240.12.2] helo=GRANTLAPTOP) by constellation.thenetnow.com with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Ph0e4-0008yH-Qk for freebsd-questions@freebsd.org; Sun, 23 Jan 2011 09:10:20 -0500 Message-ID: <7186153209294859990C5839A572C20F@GRANTLAPTOP> From: "Grant Peel" To: Date: Sun, 23 Jan 2011 09:10:15 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18263 Subject: Logrotate X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jan 2011 14:10:22 -0000 Hi all, Not sure if there is a better list to ask this, so here goes. I use logrotate to rotate the apache log files within each domains log directory. They are in the home directory as such: /home/domain1.com/logs/access_log /home/domain2.com/logs/access_log /home/domain3.com/logs/access_log ... In the home directory, I also have symlinks that point to specific domain directories, example cd /home domain1.ca -> domain1.com domain1.net -> domain1.com domain1.org -> domain1.com someothername.com -> domain1.com ... All this have beein said, when I use logrotate, it rotates the logs within the directories that have sym links pointing to them over and over again. In the case of domain1.com, the log would be rotated 5 times. I am using a logrotate.conf container that looks like so: # more logrotate.conf ... /home/*/logs/access_log { missingok rotate 14 daily create 644 root } ... So, obviously because I am using a wildcard within the container logrotate is going through the symlinks and rotating the logs over and over. Is there a way or method to ignore the symlinks (or a workaround) that anyone knows of, other than making a logrotate.conf container for each individal directory. Thanks all, -Grant