Giter Club home page Giter Club logo

synapse_scripts's Introduction

Synapse Scripts

synapse_janitor.sql

Cleans a synapse Postgres database of deleted messages and abandoned rooms.

Deleted Messages

If a message was sent in matrix and is then deleted (or redacted in technical parlance) it is not displayed but it is not removed from the server either. This script removes it.

Abandoned Rooms

If a room has been joined by someone on your homeserver but currently nobody on your homeserver is using it, this script will remove all traces of that room. NOTE: It will cause the room to disappear from people's "historical" section of old rooms. This can improve performance significantly.

Using this script

This script should be run from the command line while synapse server is stopped.

psql -Umatrix synapse < synapse_janitor.sql

synapse_dumper.sh

Allows easy backup of a matrix postgres database by dumping it to a compressed file.

synapse_startloop.sh

Script which starts up synapse if it is not running. NOTE: This is configured for a matrix server which has the synchrotron worker enabled, if you do not use the synchrotron, just comment the block at the bottom.

Using these scripts

The startloop and the dumper are appropriate for use in crontab:

* * * * * /home/matrix/synapse_scripts/synapse_startloop.sh 2>&1 >>/home/matrix/synapse_startloop.log
0 3 * * * /home/matrix/synapse_scripts/synapse_dumper.sh 2>&1 >>/home/matrix/synapse_dumper.log

synapse_scripts's People

Contributors

cjdelisle avatar nilsding avatar ansuz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.