SOLVED How to clean up old media uploads from Mattermost?
robi last edited by
Does anyone know how to do this?
The one way I thought it might work is to configure an external media store, maybe Minio and age them out somehow.
Still need a way to clean up what's internally stored.
@robi i think retention periods for uploads where only in their enterprise license. So you'd need to go through the files stored on the disk manually.
Yes, data retention policy is only part of enterprise - https://docs.mattermost.com/administration/data-retention.html
@robi I found this guide in one of the forums - https://gitlab.com/InstitutMaupertuis/mattermost-old-messages/blob/master/README.md . Use with care, since I have no clue what it does.
robi last edited by robi
Wow, what a horrible design for maintenance.
Thanks for finding it.
I'm not interested in editing the DB.
As long as I find where the files are, I can clean those up without removing the messages and references.
Looks like I found just that at /app/data/files/.
A visit via the new File Browser in the Cloudron App Config/Console easily finds the few large attachments.
Another thing I noticed is that MM generates preview and thumbnail images for some reason, which more than doubles the storage requirements for each image uploaded. Some of the generated preview images are larger than the original uploads