Matrix Synapse and Riot migration

1.3k views Asked by At

how can I migrate all my data and configuration for matrix synapse and Riot.Im installed on the system to another one VM ? Can I backup and restore all the rooms (created with Riot.IM) , the chat logs and the users and migrate all the content to another machine ?

The old system is configured without using docker.

Thank you

1

There are 1 answers

0
Sarath Chandra On BEST ANSWER

Information

All the applications are decentralized and there will be configurations file which are holding your server and connection information, Remaining all the data is stores in the Database which you are using. So we have client in your case Riot , Matrix Synapse and Database(Migration)

Riot Migration

We have a configuration file named config.json (default) which has the URL's of your synapse server. While Migrating copy the values of the from your existing riot config file to your new riot config file.

Synapse Migration

Similar to the Riot there is a homeserver.yaml and conf.d/server_name.yaml files in matrix-synapse installation folder, which has all the configurations. Copy the contents from these files to new matrix files and you are done with client and interface, Let's get into Data Migration.

Database Migration

  1. SQLITE3 to PostgreSQL follow the command

    • create dump file from sqlite

      sqlite database .dump > /the/path/to/sqlite-dumpfile.sql

    • copy that sql dump file to PostgreSQL

      /path/to/psql -d database -U username -W < /the/path/to/sqlite-dumpfile.sql

  2. Old PostgreSQL to new PostgreSQL

    • Create a dump file as backup from older PostgreSQL

      pg_dump dbname > outfile

    • Restore the data from this dump

      psql dbname < infile

  3. Using Database migration GUI tools such as Pentaho or dbsoft . Follow the dbsofts article

You can refer to element docs on migration, matrix docs and SQLite to PostgreSQL