FR: media retention based on access time. #440

Open
opened 2024-06-08 09:28:52 +00:00 by Kimiblock · 7 comments
Kimiblock commented 2024-06-08 09:28:52 +00:00 (Migrated from github.com)

Purge local and remote media that hasn’t been accessed in a certain amount of time, in order to control the size of media repo. (Preferably automatically)

Synapse manual: https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=Media_re#media_retention

Purge local and remote media that hasn’t been accessed in a certain amount of time, in order to control the size of media repo. (Preferably automatically) Synapse manual: https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=Media_re#media_retention
Kimiblock commented 2024-12-01 15:25:54 +00:00 (Migrated from github.com)

Another approach is to use systemd-tmpfiles with conduwuit's startup check disabled:

d	/var/lib/private/serverOS-conduwuit/media	-	-	-	10d

This works mostly fine for me, just need some more time to prove the stability. Maybe it can be added to the conduwuit docs.

Another approach is to use systemd-tmpfiles with conduwuit's startup check disabled: ``` d /var/lib/private/serverOS-conduwuit/media - - - 10d ``` This works mostly fine for me, just need some more time to prove the stability. Maybe it can be added to the conduwuit docs.
girlbossceo commented 2024-12-01 15:27:02 +00:00 (Migrated from github.com)

This does not differentiate between local and remote media. This will cause local media to be deleted too.

We plan on separating out the local and remote media into at least two separate directories eventually.

This does not differentiate between local and remote media. This will cause local media to be deleted too. We plan on separating out the local and remote media into at least two separate directories eventually.
Kimiblock commented 2024-12-01 15:28:32 +00:00 (Migrated from github.com)

Yes, and that's my intention. Users on my server upload media pretty often and the majority of them are useless and never accessed again.

Yes, and that's my intention. Users on my server upload media pretty often and the majority of them are useless and never accessed again.
tcpipuk commented 2024-12-01 20:04:43 +00:00 (Migrated from github.com)

Absolutely, and some people will want to purge local media the same way as remote media, but some people will also not want to do that.

Splitting the two and having them configurable separately makes a lot of sense here - it'd let both sets of people do whatever they want! 😊

Absolutely, and _some_ people will want to purge local media the same way as remote media, but _some_ people will also not want to do that. Splitting the two and having them configurable separately makes a lot of sense here - it'd let both sets of people do whatever they want! 😊
Owner

This could be pretty easy to implement based on our current media service

This could be pretty easy to implement based on our current media service
nex unlocked this conversation 2026-02-15 19:28:50 +00:00

+1 for implementing this with separation of retention config for local vs remote media. This recent Reddit thread is a great example of why this is needed - many users are resistant to use Matrix without this type of granularity: https://www.reddit.com/r/selfhosted/comments/1r5c9ti/comment/o5htgdh/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

+1 for implementing this with separation of retention config for local vs remote media. This recent Reddit thread is a great example of why this is needed - many users are resistant to use Matrix without this type of granularity: https://www.reddit.com/r/selfhosted/comments/1r5c9ti/comment/o5htgdh/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

I would even go a small step further than the original ask - it would be great to have knobs for:

  • (remote and local), delete if unused > X duration
  • (remote and local), delete if created > X duration

I would personally delete remote content quickly even if it was accessed recently

I would even go a small step further than the original ask - it would be great to have knobs for: - (remote and local), delete if unused > X duration - (remote and local), delete if created > X duration I would personally delete remote content quickly even if it was accessed recently
nex self-assigned this 2026-02-24 13:55:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity#440
No description provided.