forked from Josue-T/synapse_ynh
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Auto-clean-up synapse database #283
Labels
Comments
I feel that I have already read this somewhere...
Of course I have no idea if its doable. Just requesting :-) |
That would be a great addition! |
Can we merge this with #354 ? |
If you open a PR maybe :)
But we may rather rely on the message retention policy and synadm event cleanup API ?
Le 19 septembre 2023 02:21:04 GMT+02:00, Tio ***@***.***> a écrit :
…Can we merge this with #354 ?
--
Reply to this email directly or view it on GitHub:
#283 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Running this script as a CRON job has been useful for me, though it'd be nice if it were just part of YunoHost (or Synapse!) #!/bin/bash
set -eu
source /usr/share/yunohost/helpers
app=synapse
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
server_name=$(ynh_app_setting_get --app=$app --key=server_name)
iptables -A INPUT -s 172.17.0.0/16 -p tcp -m tcp --dport 5432 -j ACCEPT
docker run -it ungleich/rust-synapse-compress-state:2022-06-19 synapse_auto_compressor -p postgresql://$db_user:$db_pwd@172.17.0.1/$db_name -c 500 -n 100
iptables -D INPUT -s 172.17.0.0/16 -p tcp -m tcp --dport 5432 -j ACCEPT
ynh_psql_execute_as_root --database=$db_name --sql="vacuum full"
exit 0
|
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what about implementing a cron job to run such a clean-up script by default with synapse_ynh ? It would improve a major synapse drawback, and improve privacy.
https://foss-notes.blog.nomagic.uk/2021/03/matrix-database-house-cleaning/
https://gitea.prk.st/romain/synapse-tools/src/branch/master/synapse-purge.sh
As these guys are maintaining a production synapse server I guess they would keep their clean-up scripts up-to-date.
The text was updated successfully, but these errors were encountered: