At the moment, this is unfinished, experimental software for breaking my personal server. But in the long run, (contributing to) a universal matrix server migration tool would be nice.
Sorry, but following the convention we have to use math names to protest against search engine optimisation.
I want to migrate from synapse
to conduit
.
-
get rid of v1/v2 rooms (I don't think we use any on this server)
-
Dump all users
- enumerate by
/_synapse/admin
API and get login tokens for them - dumping could also be done by admin API, but to improve future portability, we use
/_matrix/client
. - one json file per user, containing
uid
: user idprofile
consiting ofdisplayname
andavatar
account_data
:global
and byroom
in the format described in the synapse admin api, implemented with async
. This contains all the E2EE public keys and the key backupdevices
pushers
- maybe a password hash and/or thirdparty ids for password resets
- no login tokens, devices should be able to log in with the same device id after a soft logout.
- enumerate by
-
Dump Room state (via admin api) and it's auth chain (via federation requests to
.../event/...
). Synapse can talk happily to "itself", i.e. using the own domain name and signing key for the requests.- will be a json file per room
- in later state resolutions, conduit will fetch the other state events via federation
-
Transfer signing key
-
import user and room state into a conduit database
-
implement backfilling in conduit
- patch it so it can request its past using
/backfill
,/event
/get_missing_events
from the still running synapse
- patch it so it can request its past using
-
switch to conduit, let synapse running and reachable only by the conduit instance
-
tell the few other users to scroll through their non-federated messages (or automate it using
_matrix/client/messages
requests)- i think for me that's mostly private chat or bridged rooms (which are ok to lose, i have to clean them anyway at some point)
-
shut down synapse
-
what am I missing? :)
- There is some experimental code for trying out the various APIs.