[Asterisk-Users] Logger rotate & master.csv

Massimiliano Stucchi stucchi at willystudios.com
Tue May 23 01:40:44 MST 2006


On 230506, 10:10, Asterisk wrote:
> 
> I have noticed that 'logger rotate' command only rotates log files in
> the /var/log/asterisk directory, but not in the subdirectories. How
> could I rotate my /var/log/asterisk/cdr-custom/Master.csv log file?

Just create a shell script like this:

#!/bin/sh

BKPREF="backup_cdr"
BKNAME="$BKPREF.`date +%Y.%m.%d.at.%H.%M.%S`"   # how to name your files
BKPATH="/data/backup"               # backup directory

mv /var/log/asterisk/cdr-custom/Master.csv ${BKPATH}/${BKNAME}


and you're done.


-- 

Massimiliano Stucchi, CTO & Director of Operations
WillyStudios.com - IT Consulting, Web and VoIP Services
stucchi at willystudios.com | Tel (+39) 0244417203 | Fax (+39) 0244417204
IT-20040, Carnate (Milano), via Carducci 9

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060523/71fd55c0/attachment.pgp


More information about the asterisk-users mailing list