DEPRECATED. The scripts have been moved to ansible.
Synapse (matrix server) scripts for Anarchy Planet
By default, the synapse admin API limits the rooms query to 100 results. This was causing the purges to apply to ~5% of rooms on our server. Now we set a higher limit for the room query. |
||
---|---|---|
Makefile | ||
README.md | ||
synapse-purge-compress.sh |
Synapse (matrix server) scripts for Anarchy Planet.
Dependencies
curl for GET and POST to the synapse API.
jq for JSON parsing.
psql utility, which is normally automatically installed with the postgresql server.
synapse-compress-state for compressing the synapse state tables.
Installing
With this repository as your working directory, run make
as root.
Using the scripts
synapse-purge-compress
The postgres database for the matrix synapse server grows big fast. This script brings its size back down by purging old data and compressing the state tables.
Run as the matrix-synapse user, for example:
sudo -u matrix-synapse synapse-purge-compress
Run from cron:
sudo -u matrix-synapse crontab -e
Add a line like so:
0 2 1 * * /usr/local/bin/synapse-purge-compress
NOTE: the script is still very verbose, so you may want to run it with chronic from moreutils.