Topic: SOGO databases are HUGE
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloader
- Linux/BSD distribution name and version: ubuntu server 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Why are the SOGO tables so big? I'm running on a virtual machine on my file server and I kept having to resize the vdisk. Turns out SOGO tables are enormous for relatively little data. The sogo_cache_folder is 500M, sogo_quick_contact is 500M and the sogo_store table where most of the data is is 1.5GB. This is all for just 5 users. I checked the backup files and one moderate user of the calendar is ~55M backup but another user is >290M for the backup. SOGO's been keeping 30days of these backups on a folder on the vdisk also. That's >9GB of backup data just for SOGO.
I have my email folders pointing to a 9p filesystem for a local share on the disk array but not MySQL or SOGO. Can I just move the MySQL folders and create a symlink or will apparmor stop MySQL from writing there without a ton of work? It's looks like a pain to tell MySQL to write elsewhere because of apparmor and then also I'm afraid iRedmail updates will be a problem with too custom a set up.
I should be clear with the questions:
1. Is something wrong with SOGO that the DBs are so large?
2. Is there a robust way to tell all the backups to go to a specific backup location instead of places like ~sogo/backup?
3. Can the mysql locations be simply moved with a symlink?