Our FreePBX hard drive is getting filled up and need to find the proper method to deal with this.
In my /var/lib/mysql folder there is a 81 gigabyte file called ibdata1
I’m assuming the file is growing larger overtime because of CDRs and CELs accumulating. I’m trying to figure out a way I can remove all CDR and CELs that are older than 1 year and also shrink the ibdata1 file as much as possible.
[root@freepbx mysql]# ls -lh
total 81G
-rw-rw----. 1 mysql mysql 16K Nov 12 09:13 aria_log.00000001
-rw-rw----. 1 mysql mysql 52 Nov 12 09:13 aria_log_control
drwx------ 2 mysql mysql 16K Nov 15 08:02 asterisk
drwx------ 2 mysql mysql 132 Feb 28 2022 asteriskcdrdb
-rw-rw---- 1 mysql mysql 81G Nov 17 13:12 ibdata1
-rw-rw---- 1 mysql mysql 5.0M Nov 17 13:12 ib_logfile0
-rw-rw---- 1 mysql mysql 5.0M Nov 17 13:11 ib_logfile1
drwx------ 2 mysql mysql 20 Oct 14 2021 iot
drwx------. 2 mysql root 4.0K Oct 14 2021 mysql
srwxrwxrwx 1 mysql mysql 0 Nov 12 10:52 mysql.sock
drwx------. 2 mysql mysql 4.0K Oct 14 2021 performance_schema