remove old recordings

Any and all non-support discussions

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

remove old recordings

Postby gmcust3 » Tue Apr 06, 2010 5:45 pm

When I installed my server, it WAS:

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

Today, after 3 months when My HDD is 80% filled , I uncommented it.

Now, when i reboot, I don't see any decrease in space.

24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f

"24 0" means it will run at Exactly when its 24 hr on the server time ??

What if that time calling is going on ??
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Postby DarknessBBB » Tue Apr 06, 2010 6:34 pm

Exactly at 00:24 am ;-)
DarknessBBB
 
Posts: 328
Joined: Mon Jul 16, 2007 10:14 am

Postby gmcust3 » Tue Apr 06, 2010 6:40 pm

To delete, 350 GB, It will take 3-4 hrs ?

System will go down ?

Preferable to run it when noone logged in ?
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Postby gmcust3 » Tue Apr 06, 2010 6:40 pm

To delete, 350 GB, It will take 3-4 hrs ?

System will go down ?

Preferable to run it when noone logged in ?
GoAutoDial CE
VERSION: 2.4-309a
BUILD: 110430-1642
No other software installed on the box.
I've read the manager manual.
gmcust3
 
Posts: 1148
Joined: Sat Oct 24, 2009 1:15 pm

Postby boybawang » Wed Apr 07, 2010 1:27 am

depnding on your hard drive speed try this command :

rm -rf /var/spool/asterisk/monitorDONE/ORIG
rm -rf /var/spool/asterisk/monitorDONE/mp3

then recreate those directories again:

mkdir -p /var/spool/asterisk/monitorDONE/ORIG
mkdir -p /var/spool/asterisk/monitorDONE/mp3

usually its the ORIG folder that fills the hard drive since it stores uncompressed WAV files which are like 10 mb upwards
Vicidial Installation + Configuration + Support + Custom Development
Download my ebook on installing vicidial for free http://download.vicidial.com/ubuntu/VIC ... 100331.pdf
skype: deodax.cordova@gmail.com
m: +639172063730
boybawang
 
Posts: 989
Joined: Sat Nov 14, 2009 1:18 pm
Location: Dumaguete City, Negros Oriental, Philippines

Postby Acidshock » Wed Apr 07, 2010 1:40 am

Here is a cron job that I use to remove anything older than 20 days. Works a little better IMO.

### remove recording older than 20 days
0 3 * * * find /var/spool/asterisk/monitorDONE -mtime +20 -exec rm {} \;
Acidshock
 
Posts: 430
Joined: Wed Mar 03, 2010 3:19 pm

Postby AlSam » Sat Oct 02, 2010 6:18 pm

boybawang wrote:usually its the ORIG folder that fills the hard drive since it stores uncompressed WAV files which are like 10 mb upwards

Have you found it safe to delete the contents of the orig folder? My setup has recordings in this folder as well as the GSM folder. So far I have found that the recordings are the same between these two folders. Can't figure out, though, why there are so many copies of the call recordings. ORIG folder has a copy with the word all at the end, a second with the word in at the end (equal in size to the first one), and a third with the word out at the end which is 44 bytes in size. The GSM just has one file per call with the proper file name.
ViciBox v.7.0.4-170113 | VERSION: 2.14-697a BUILD: 190121-2019 | Asterisk 11.25.1-vici | All-In-One | No additional software
AlSam
 
Posts: 125
Joined: Thu Sep 02, 2010 1:17 pm

Re: remove old recordings

Postby eglantcelniku » Wed Dec 21, 2016 6:59 am

I want to delete only the Old reg,I want to keep only the last 2 months?
eglantcelniku
 
Posts: 1
Joined: Wed Dec 21, 2016 4:06 am

Re: remove old recordings

Postby rrb555 » Wed Dec 21, 2016 11:35 pm

that is easy and possible
One server that I am managing | Single Server | ViciBox Redux 6.0 | VERSION: 2.12-549a | BUILD: 160404-0940 | revision 2508| No other hardware
For help you can send me a direct email info@support.com.ph
rrb555
 
Posts: 585
Joined: Tue Feb 08, 2011 4:24 pm
Location: Quezon City, Philippines

Re: remove old recordings

Postby williamconley » Sun Jan 15, 2017 5:33 pm

eglantcelniku wrote:I want to delete only the Old reg,I want to keep only the last 2 months?


Deletes the original, uncompressed, copies of the files nightly.

Deletes the FTP folder copy of any files that have already been pushed to the FTP recording archive server nightly, as they are now redundant (if they have not been pushed, it does not delete them). Deletes the MP3 folder (live copy) of all recordings after 65 days.
Code: Select all
26 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/MP3 -maxdepth 2 -type f -mtime +65 -print | xargs rm -f
25 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/FTP -maxdepth 2 -type f -mtime +1 -print | xargs rm -f
24 1 * * * /usr/bin/find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +1 -print | xargs rm -f
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 41 guests