From owner-freebsd-questions Wed Dec 5 9:19:22 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marble.dublin.wbtsystems.com (marble.dublin.wbtsystems.com [193.120.231.8]) by hub.freebsd.org (Postfix) with ESMTP id 3C74437B405 for ; Wed, 5 Dec 2001 09:19:15 -0800 (PST) Received: from spiral (spiral.dublin.wbtsystems.com [193.120.231.190]) (authenticated) by marble.dublin.wbtsystems.com (8.11.6/8.11.6) with ESMTP id fB5HJBA01892; Wed, 5 Dec 2001 17:19:11 GMT From: "Barry Byrne" To: , Subject: RE: newsyslog - backup logfile question Date: Wed, 5 Dec 2001 17:19:10 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20011205164234.50132.qmail@web11801.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jason: Making a date-stamped directory could be done something like: #!/bin/sh DATE=`date +%Y_%m_%d` BACKUPDIR="log_backup/logs$DATE" the date command is pretty flexible - man date if you need something different. - Barry -- Barry Byrne > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of X Philius > Sent: 05 December 2001 16:43 > To: freebsd-questions@FreeBSD.ORG > Subject: Re: newsyslog - backup logfile question > > > Louis, > I had the same thought about moving logs/*.gz to a folder on a regular > basis. How about setting up a simple shell script to move *.gz to a > folder named with the date, log_backup/logs_12_05_01/ or some such? > That way the numbered *.gz files won't get over written. Its a simple > solution, but should accomplish our goal! I am a /bin/sh newbie, so I > honestly haven't figured out how to get the date, formatted nicely for > a folder name, into a variable yet, but I am quite sure it is easy ;-) > > Jason > > --- Louis LeBlanc wrote: > > Quick question about newsyslog. I suspect it's not possible, but it > > can't hurt much to ask, right? > > > > I often go thru logs on a daily basis, and often have to sort thru > > the > > directory to find the current logs. I wonder if it is possible to > > have newsyslog, in addition to gzipping old logs, to put all gzipped > > backups into a ./bak/ directory? I know it has to know how many > > backups it has kept, so I can't just move *.gz files in on a regular > > basis - that would screw things up. I found nothing in the manpage, > > and I'm not sure where else to look. > > > > Obviously this would be an easy enough feature to add, but I'm not > > inclined to put yet another rod in the furnace just yet. > > > > Thanks in advance. > > Lou > > -- > > Louis LeBlanc leblanc@keyslapper.org > > Fully Funded Hobbyist, KeySlapper Extrordinaire :) > > http://www.keyslapper.org T?T, > > > > Mencken and Nathan's Fifteenth Law of The Average American: > > The worst actress in the company is always the manager's wife. > > > > > ATTACHMENT part 2 application/pgp-signature > > > > __________________________________________________ > Do You Yahoo!? > Buy the perfect holiday gifts at Yahoo! Shopping. > http://shopping.yahoo.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message