Skip to content

Instantly share code, notes, and snippets.

View verymilan's full-sized avatar

Milan verymilan

View GitHub Profile
#!/bin/bash
# >>> https://github.com/matrix-org/rust-synapse-compress-state <<<
# use this tool to compress room states, it can free up hundreds of gigabytes!
# the synapse-compress-state.sh script helps you to loop through many rooms automatically
# be aware that depending on your installation and hardware, this will take hours/days!
#
# synapse-compress-state.sh is far from perfect and inspired by https://github.com/matrix-org/synapse/blob/master/contrib/purge_api/purge_history.sh
# DO BACKUPS! BE CAREFUL! DON'T BLINDLY COPY AND RUN THIS SCRIPT!
# you in theory don't need to turn synapse off but to actually free up the disk space you need to vacuum your db which locks the tables

Keybase proof

I hereby claim:

  • I am tchncs on github.
  • I am tchncs (https://keybase.io/tchncs) on keybase.
  • I have a public key whose fingerprint is 8010 3813 3C9B 4983 05FD 6FFD 5E1A E963 5F53 2C4A

To claim this, I am signing this object: