Multiple Master.csv files

Why are there Multiple Master.csv files?

In the cdr-csv directory i have:
Master.csv
Master.csv.1

Master.csv.5

Why does the system do this?
And how can I remove this function so the system only uses Master.csv?

Are your logs being rotated? Are all 3 files written to simultaneously?

It looks like logrotate is setup to rotate your Asterisk logs and was mistakenly setup to rotate the Master.csv too.

Your Asterisk logs should be in /var/log/asterisk and the Master.csv should be in /var/log/asterisk/cdr-csv

Look in /etc/logrotate.d for a file that contains something like the following. The file name could be asterisk.

Look for a space between the * and log. this would cause the problem you are seeing.

/var/log/asterisk/messages /var/log/asterisk/*log /var/log/asterisk/full {
missingok
rotate 7
daily
create 0644 root root
postrotate
/usr/sbin/asterisk -rx ‘logger reload’ > /dev/null 2> /dev/null
endscript
}