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

Darryl Dunkin ddunkin at netos.net
Sat Jun 14 22:49:04 CDT 2008


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

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation

Gavin,


I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.

I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.

Thanks,
Mark.

PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later. :)


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation

2008/6/13 Mark Hamilton <mark.h at cage151.com>:
> Hi,
>
>
>
> How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
date?
>

Logrotate on a *nix box.

-- 
http://www.suretecsystems.com/services/openldap/

_______________________________________________
-- 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


_______________________________________________
-- 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