1. Bicom Systems
  2. Solution home
  3. PBXware
  4. HOWTOs

General :: HOWTO Delete recordings from shell

If you need to delete old recordings on your system, please login to the system shell as a root user and execute command below:


Call Center/Business Edition:


find /opt/pbxware/pw/var/spool/asterisk/monitor -ctime +DAYS -exec rm {} \;

Replace +DAYS with the number of days.


For example:


find /opt/pbxware/pw/var/spool/asterisk/monitor -ctime +180 -exec rm {} \;



This command will delete all recordings older than 180 days.


Multi-Tenant Edition:


The procedure on MT system is the same if you would like to delete all recordings older than specific number of days, across all tenants.the 


However, if you would like to delete recordings on specific tenant only, you will need to add tenant number to the path.


find /opt/pbxware/pw/var/spool/asterisk/monitor/500 -ctime +DAYS -exec rm {} \;



Replace DAYS with the number of days and XXX with Tenant number.


For example:


find /opt/pbxware/pw/var/spool/asterisk/monitor/500 -ctime +180 -exec rm {} \;


This command will delete all recordings older than 180 days on tenant 500.



IMPORTANT NOTICE:


Before performing any operations that involve deleting files from the system, it is strongly recommended to create a backup or clone of the relevant data. This precaution is essential unless you are absolutely certain of the commands you are executing.


As an additional safety measure, it is advisable to first list the files you intend to delete using the following command:


find /opt/pbxware/pw/var/spool/asterisk/monitor/500 -ctime +DAYS -ls


To list files older than 180 days, replace DAYS with 180

find /opt/pbxware/pw/var/spool/asterisk/monitor/500 -ctime +180 -ls