Kopano: sava attachements as BLOB inside the DB

hi there!

i’m just evaluating a migration from MS-Exchange to an open source solution. After comparing some solutions I think kopano is the tool to serve our needs, and since it’s availeble as fully integrated app inside the UCS server, I even consider replacing our Domain Controllers by UCS.
Since the eMail system is critical for our buisiness I also have to make some thoughts about high availebilty. Regarding the database it’s no problem - we already have several big mysql and mariaDB machines running as galera cluster or with master/slave replication. For testing purpose I just copied the database from the local (USC Test) machine to one of these mysql databases and configured UCS/Kopano to use this database… works pretty well. But I have to maintain also the attachments, which are stored locally on disk. As far as i Know, these attachements were saved as lob object inside the database some time ago and there is still a migration script to move the attachements out of the database. But I thinks it’s more handy to have them inside the database, so it’s automatically replicated and backed up with the current solution in place… but I havent found a solution to migrate the data back to the database or to make a fresh installation of Kopana storing the attachements inside the database (only when i Install kopano manually from source this seems to be possible).

any advise would be welcome, even if you just give me reasons not to store the attachements in the database :wink:

regards
Benjamin

Hi @kurschies,

while technically you could still set the database as your attachment storage (there is only no way to go from files back to database, but you could start fresh with attachments in the database), I’d really not recommend to do so, since attachments usually account for 75-90% of your total storage, and no one wants to handle databases of multiple terabytes in size.

Like already written in https://forum.kopano.io/topic/370/kopano-core-high-availebility i would also urge you to reconsider Galera. While a master-master replication is a valid idea, Galera to my knowledge has the downside of storing a full replica of all your databases on each node, again not really a good idea when thinking of multiple terabytes of emails and attachments. Not to mention other potential applications stealing i/o from your kopano database.

But if you really want to go for attachments in db, you need to modify attachment_storage like ucr set kopano/cfg/server/attachment_storage=database (typed from the top of my head so the actual syntax may differ) and stop your server before and drop your old database.

Other options are of course to make the drive you store your attachments on “high available” (latency is not really an issue for us, since attachments are mostly on access) or use our s3 backend and have a ha s3 storage.

Mastodon