[asterisk-users] cdr-custom/Master.csv rotation

Mark Hamilton mark.h at cage151.com
Sun Jun 15 11:41:19 CDT 2008


That works, thanks a lot!

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Philipp
Kempgen
Sent: June 15, 2008 12:35 PM
To: Asterisk Users
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation

Mark Hamilton schrieb:

> I'm attempting to use this now as is, but Tzafrir points out that this
might
> not rotate Master.csv in /cdr-custom. In such a case, what would I need to
> do?

> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl
Dunkin
> Sent: June 14, 2008 11:49 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
> 
> It's like asking for directions, and someone tells you to drive,
> useless.
> 
> Here is what we do here:
> Create /etc/logrotate.d/asterisk:
> /var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
> /var/log/asterisk/debug /var/log/asterisk/queue_log {
>     daily
>     rotate 7
>     compress
>     missingok
>     notifempty
>     sharedscripts
>     postrotate
>         /usr/local/bin/log_rot_ast
>     endscript
> }
> 
> /usr/local/bin/log_rot_ast contains:
> #!/bin/sh
> /usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1

logrotate can be used to rotate any files you want. So just add
a logrotate definition to /etc/logrotate.d/asterisk:

/path/to/my/cdr-custom/Master.csv {
	daily
	rotate 7
	compress
	missingok
	notifempty
}


Grüße,
Philipp Kempgen
-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list