Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Limit size of room storage (files and history) in Matrix server #2315

Open
MurzNN opened this issue Jun 28, 2017 · 6 comments
Open

Limit size of room storage (files and history) in Matrix server #2315

MurzNN opened this issue Jun 28, 2017 · 6 comments
Labels
A-Disk-Space things which fill up the disk

Comments

@MurzNN
Copy link

MurzNN commented Jun 28, 2017

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?

@MurzNN
Copy link
Author

MurzNN commented Jun 28, 2017

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

@4nd3r
Copy link
Contributor

4nd3r commented Jun 29, 2017

Is there any ways to limit size of disk storage

no

but see #890 #1621 #1730 #2260

@makedir
Copy link

makedir commented May 3, 2018

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?

@MurzNN
Copy link
Author

MurzNN commented Oct 15, 2018

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:

@rubo77
Copy link
Contributor

rubo77 commented Oct 15, 2018

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

@xster
Copy link

xster commented Jan 30, 2021

Or even for a manual clean up, it would be nice to be able to extend the APIs added in #3479 and #8519 to be able to target media by room so popular noisy chat rooms can be manually purged more often than small rooms between close friends.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Disk-Space things which fill up the disk
Projects
None yet
Development

No branches or pull requests

6 participants