Hi all, this is my first post.
My installation of FreePBX stopped working with a full /dev/mapper/s7_freepbx-root partition after operation for a few months. I deleted some rather large log files and got it working again but it continues to fill up disk space. After scouring the volume, I’ve found some large zipped files that look like they may have been used to upgrade FreePBX modules. I’ve attached a screenshot of what I found at /home/asterisk/.package_cache/npm/5.6.0. Is it possible to delete these without breaking FreePBX?
They should be safe to delete, but they add up to less than one gigabyte, so you should look elsewhere for the problem, unless your disk is really tiny.
show? How big is the partition?
This command will show you the top 20 directories that have the largest collective files in them. Specifically this command will limit you to VAR
du -a /var/ | sort -n -r | head -n 20
If you record calls, the default location is in /var/ that can be culprit.
This will look at the entire file system and give you a count.
du -a / | sort -n -r | head -n 20
After about 2 years into my Incredible PBX VM-based deployment, I too was running into disk space issues. And increasing the disk partition size in Linux involves a lot more steps than doing so with a Windows VM. So I started looking at the larger files, and their necessity.
Besides the various log files, I found two separate locations for CDR’s and CEL’s. One was in CSV text format, and the other was in DB tables. What I did was truncate the DB tables to only contain the current year’s CDR and CEL data. And I just zeroed out the CSV file. If I wanted to retain the data I could always TFTP them off to another location.
Here are a few CLI statements below that accomplished this. Not saying this is the best route, but it worked for me. And took available disk space from 20% up to 60%.
truncate -s 0 Master.csv #this text-based CDR log isn’t really necessary anyway
mysql -u freepbxuser -p asterisk
Enter password: #found in /etc/asterisk/cdr_mysql.conf or /etc/freepbx.conf
DELETE from cdr WHERE calldate < '2020-01-01 00:00:00'; #or whatever year you are keeping
DELETE from cel WHERE eventtime < '2020-01-01 00:00:00'; #or whatever year you are keeping
DELETE from cel WHERE context = 'tc-maint';
OPTIMIZE TABLE cdr; #packs the table
OPTIMIZE TABLE cel; #packs the table
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.