Synapse: Document how to back up a synapse server

Created on 22 Mar 2017  路  7Comments  路  Source: matrix-org/synapse

We should give users some guidance on what they need to do to effectively back up and restore a synapse.

Off the top of my head:

  • database
  • media repo
  • homeserver.yaml
  • log config, where present
  • signing key
  • TLS certs?
docs

Most helpful comment

Has anyone done this?

Hey guys, I just moved my synapse instance and everything seems to work including message history and images uploaded in the past.

I transferred:

  • config: /etc/synapse/homeserver.yaml and /etc/synapse/log_config.yaml
  • database: /var/lib/postgresql
  • signing key: /etc/synapse/foo.bar.signing.key
  • media repo: /var/lib/synapse

All 7 comments

definitely interested in this, we're currently doing the things you mention (well, a little more 'verbose' in that I'm pulling /etc/synapse/*)

Absolutely agree, also interesting is discourse's self backup function that simply asks you for your S3 credentials and does everything by itself. That would be perfect. Thanks for the great work.

@richvdh any updates ?

PRs welcome...

I'm about to do this; moving a Synapse installation from a FreeBSD jail to a Linux container (same CPU architecture, so the data should be compatible). The app configuration and logging configuration is already managed by Ansible so that part is easy, as is the NGINX proxy in front of it and the TLS configuration.

That leaves the database, media repository, and any keys for the server itself. Has anyone done this?

this is a very interesting question....

Has anyone done this?

Hey guys, I just moved my synapse instance and everything seems to work including message history and images uploaded in the past.

I transferred:

  • config: /etc/synapse/homeserver.yaml and /etc/synapse/log_config.yaml
  • database: /var/lib/postgresql
  • signing key: /etc/synapse/foo.bar.signing.key
  • media repo: /var/lib/synapse
Was this page helpful?
0 / 5 - 0 ratings