Synapse: Limit size of room storage (files and history) in Matrix server

Created on 28 Jun 2017  路  5Comments  路  Source: matrix-org/synapse

Is there any ways to limit size of disk storage (total files and history size on megabytes, stored in server database) per chat room or per user in Matrix server?

disk space

Most helpful comment

And maybe cleanup rules for auto-delete old history records, images and files?

All 5 comments

And maybe cleanup rules for auto-delete old history records, images and files?

Is there any ways to limit size of disk storage

no

but see #890 #1621 #1730 #2260

How can it be, that there is no implementation of this simple and important feature? I looked at #890 #1621 #1730 #2260 and none of those give a solution to it. Is there some script which will delete everything in any channel after like 180 days including all the uploaded media?

Is there some script which will delete everything in any channel after like 180 days including all the uploaded media?

No ready script at now, but can be done via getting list of all rooms and cycling run those scripts on each room:

And if you are unfearful, just delete old large files with

find ~/.synapse/media_store/ -type f -size +5M -mtime +120 -exec rm -iv {} \; # size >5MB, older than 120 days
Was this page helpful?
0 / 5 - 0 ratings