Page 1 of 1

Call recording removal time ?

PostPosted: Mon Oct 20, 2014 5:33 am
by boiken
Hello

my server delete recording that are older than 7 days.

I want to change this from 7 days ti 6 months.
How can i change this and where do i have to change this ?

This is my Crontab Script for monitorDONE

### remove old recordings more than 7 days old, and delete originals after 1 day
#24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f
24 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +1 -print | xargs rm -f


Thanks

Re: Call recording removal time ?

PostPosted: Mon Oct 20, 2014 11:21 am
by geoff3dmg
The way your crontab is setup, the wav files get removed after 1 day and the mp3 files never ever get removed (because it's commented out). If you want to remove the mp3's after 6 months you uncomment the first find command and alter the '-mtime +7' to '-mtime +180'.

You can test if you've got it right by copying the command and running it manually without the '| xargs rm -f' on the end. It'll just print a list of files it would of removed.

However, I would highly recommend you look at implementing an archive server if you have a large quantity of recordings.

Re: Call recording removal time ?

PostPosted: Mon Oct 20, 2014 4:36 pm
by boiken
Ok.so it means that i dont need orig files if i have the mp3 copy .right ?
Thanks

Re: Call recording removal time ?

PostPosted: Tue Oct 21, 2014 3:56 am
by geoff3dmg
Yes, you don't need those.

Re: Call recording removal time ?

PostPosted: Tue Oct 21, 2014 2:14 pm
by boiken
Thank you geoff3dmg