Call recording delete after x amount of days

Status
Not open for further replies.

reap.virtue

Member
Mar 2, 2023
108
2
18
22
Hello how can I set up that call recording should delete automatically after a certain amount of days?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Something along the lines of this in crontab:
Code:
0 2 * * * /usr/bin/find /var/lib/freeswitch/recordings/*/archive -type f -mtime +90 -exec rm -rf {} \;
 

mcs3ss2

Active Member
Sep 8, 2020
286
33
28
AU
here is ho I do it

I use maintenance script to delete old faxes / voicemail over 30 days
I call maintenece script in crontab like DigitalDaz

Code:
#Run fusionpbx-maintenance.sh
#Delete Faxs older than 30 days & clear database whitespace
#Delete voicemail older than 30 days & clear database whitespace
0 21 * * * bash /etc/cron.daily/fusionpbx-maintenance
 

s2svoip

Member
Dec 9, 2019
259
8
18
44
here is ho I do it

I use maintenance script to delete old faxes / voicemail over 30 days
I call maintenece script in crontab like DigitalDaz

Code:
#Run fusionpbx-maintenance.sh
#Delete Faxs older than 30 days & clear database whitespace
#Delete voicemail older than 30 days & clear database whitespace
0 21 * * * bash /etc/cron.daily/fusionpbx-maintenance
does that not run daily as its in the cron daily folder ..?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
It would appear, in the latest version that it actually DOES run.

I was unaware oif this and certainly do not want a db backup every night on the same box :)

You can test it running by:

Code:
run-parts /etc/cron.daily

I think in older version, the file had a suffix, like .conf or something and that prevented it running until renamed.

There are a bunch of config variables that it looks like you can enable/disable and tweak the features.

I'm gonna start using this I think, its much sleeker than what it was. :)
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
Yes, I just did:

Code:
mv /etc/cron.daily/fusionpbx-backup /etc/cron.daily/fusionpbx-backup.conf

Now when I do the run parts, the backup of the db does not happen
 
Status
Not open for further replies.