Auto delete recording

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Auto delete recording

Postby kamirie » Mon Aug 20, 2012 6:42 am

Good Day ,

Can i change this on crontab

Code: Select all
### remove old recordings more than 7 days old
# 24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +7 -print | xargs rm -f


to make it delete recordings 30 days old rather than 7 days old? will it be like this?

Code: Select all
### remove old recordings more than 7 days old
# 24 0 * * * /usr/bin/find /var/spool/asterisk/monitor -maxdepth 2 -type f -mtime +30 -print | xargs rm -f


will this also delete recordings in the ORIG folder?
Vicibox 6.0.3
http://download.vicidial.com/iso/vicibo ... nstall.pdf
VERSION: 2.12-492a
BUILD: 150701-1131

Single Server
Amd opteron Quad Core @ 3.0 Ghz
8GB RAM
kamirie
 
Posts: 84
Joined: Tue Dec 27, 2011 7:46 pm

Re: Auto delete recording

Postby Acidshock » Tue Aug 21, 2012 4:54 pm

I believe you want monitorDONE not monitor. However yes changing the mtime to 30 will cause the system to delete those recordings after 30 days not 7. It will also delete the originals.
VERSION: 2.14-698a | BUILD: 190207-2301 | Asterisk:13.24.1-vici | Vicibox 8.1.2
Acidshock
 
Posts: 430
Joined: Wed Mar 03, 2010 3:19 pm

Re: Auto delete recording

Postby kamirie » Tue Aug 21, 2012 10:49 pm

Acidshock wrote:I believe you want monitorDONE not monitor. However yes changing the mtime to 30 will cause the system to delete those recordings after 30 days not 7. It will also delete the originals.


So it will be like this?
Code: Select all
### remove old recordings more than 7 days old
# 24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +30 -print | xargs rm -f

if i set it like this in crontab -e
Code: Select all
### remove old recordings more than 7 days old
# 24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +30 -print | xargs rm -f

will it erase only the ORIG folder and leave MP3 folder intact?
Vicibox 6.0.3
http://download.vicidial.com/iso/vicibo ... nstall.pdf
VERSION: 2.12-492a
BUILD: 150701-1131

Single Server
Amd opteron Quad Core @ 3.0 Ghz
8GB RAM
kamirie
 
Posts: 84
Joined: Tue Dec 27, 2011 7:46 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 76 guests