matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.68k stars 667 forks source link

Migration process from Synapse #1705

Open Ralayax opened 3 years ago

Ralayax commented 3 years ago

It might be nice to provide a documentation for the migration process from synapse to dendrite, at least for homeserver users.

Maybe we can track progress for this in this issue ?

devsnek commented 3 years ago

Just in response to the "long term" prioritization on this... I suspect there would be a lot of people happy to contribute and give feedback to the beta if we could migrate today.

deansheather commented 3 years ago

Synapse is unsustainable to run on your own server because of how unoptimized it is. It's getting to the point where I need to restart regularly to keep memory and CPU usage below acceptable levels.

I'd love to contribute a migration script but I'd need a crash course from someone familiar with the database structures of dendrite and synapse so I can figure out what needs to go where.

ShadowJonathan commented 3 years ago

I'd wanna advertise my own MSC in this issue for this exact problem; MSC2783: Homeserver Migration Data Format, which solves this problem by providing an implementation-agnostic way of migrating between homeservers.

Personally, I think effort is best spent focusing on such a thing like this instead of keeping up migration scripts between every (Dendrite, Synapse) version that devs are aiming to support, an agnostic migration format explicitly avoids "lock-in" between either synapse or dendrite, deduplicates efforts, and mitigates a category of bugs.

kegsay commented 3 years ago

We do not recommend people replace producution Synapse instances with Dendrite yet, so we have no intention of making a migration script at this time. Dendrite is ready for early adopters and those who want to experiment with different server implementations.

In the long term, we will have some migration process when we feel that Dendrite can be a viable alternative to Synapse, though I have no idea what shape that will take currently beyond "we will have a way to do it".

Ralayax commented 3 years ago

If I understand, it's basically a dilemma between getting people to test the software and preventing data loss, the problem with not having people migrate being that you won't have as much testing feedback.

Does this issue need to stay open until dendrite is usable enough to risk the migration ?

kegsay commented 3 years ago

This issue is useful to point people to since it's a natural question to ask, so keeping it open and visible has some use. It will likely remain this way until a migration script is written, which realistically won't be until Dendrite is a viable production alternative to Synapse.

KenMacD commented 3 years ago

Maybe there's some way to create something but mark it as very 'alpha' with lots of warnings?

I expect there's a fair number of users like me that have a handful of friends/family accounts and will switch and try it when such a script or data-format exists. If everything breaks that's okay, but it would be nice not to have to re-create the accounts and set passwords, etc.

ShadowJonathan commented 3 years ago

Reminder that I am still intending to work on a PoC for MSC2783, this can qualify for that "alpha" (when I get around to it...)

dontlaugh commented 3 years ago

I expect there's a fair number of users like me that have a handful of friends/family accounts and will switch and try it when such a script or data-format exists.

I agree with this. I run a Synapse server for a few friends. We're technical enthusiasts who can accept some breakage and downtime, but we don't want to leave behind all our old messages in the transition.

Gurkengewuerz commented 2 years ago

I totally agree with you guys. Since we now have push implementation in Dendrite my friends and i are willing to migrate from Synapsen but don't want to loose our messages. We are technical enthusiast and respect the expected bugs on such an alpha software!

This issue is a year old. Are there any updates on this when we can expect an early alpha?

ShadowJonathan commented 2 years ago

@Gurkengewuerz

At the moment there is no official (public) push to get server migration going, however, in my free time I’ve been trying to start a project called variate. (Though due to juggling priorities, I haven’t really made that much progress with it yet.)

I hope that this can develop to be enough in the near future to at least have a rudimentary Synapse->Dendrite migration be possible.

If you’re following TWIM, I’ll announce a first alpha (PoC to losslessly transfer the same data between Synapse and Dendrite, and back) on there when that’s done.

nab-os commented 1 year ago

Hello, is there a know way to migrate from Synapse to Dendrite at the moment ?

axiopaladin commented 11 months ago

Somebody sent this message in the #dendrite-dev:matrix.org room a few weeks ago, it includes a link to a synapse -> dendrite migration script they wrote. Obviously it is unsupported and use-at-your-own-risk, but it may be a useful starting point for anyone who wants to build such a tool.

K1D77A commented 6 months ago

An officially supported migration tool is required for more adoption of dendrite.

erebion commented 1 month ago

An officially supported migration tool is required for more adoption of dendrite.

Ideally one could simply configure Dendrite to use the database previously used by Synapse and Dendrite finds out what is going on and automatically applies all the necessary migrations after first prompting the user two things:

Then it'd ask "Do you really want to continue?".

K1D77A commented 1 month ago

Somebody sent this message in the #dendrite-dev:matrix.org room a few weeks ago, it includes a link to a synapse -> dendrite migration script they wrote. Obviously it is unsupported and use-at-your-own-risk, but it may be a useful starting point for anyone who wants to build such a tool.

Tried this for a our recent migration and it doesn't work.

caesar commented 1 month ago

I'm curious to see that there are still people trying to migrate to Dendrite. So far as I can tell it is no longer under active development. Am I missing something?

el-dge commented 1 month ago

I'm curious to see that there are still people trying to migrate to Dendrite. So far as I can tell it is no longer under active development. Am I missing something?

No and personally I search a migration tool from Dendrite to Synapse ... !

xaionaro commented 1 month ago

I'm curious to see that there are still people trying to migrate to Dendrite. So far as I can tell it is no longer under active development. Am I missing something?

I tried Dendrite and I loved it, but without a migrating tool I loose too much of important message history, so personally I'm still waiting for the tool.

snex commented 3 weeks ago

I'm pretty sure the vast majority of matrix users are doing this as a hobby and would be more than willing to help out with testing the migration process, so I don't see this as a reason to not do any work on it. If you wait until dendrite is NOT beta before doing any kind of migration support at all, you are going to have some very pissed off users when they find out the migration process is beta.

Let's make this happen. I want to migrate my synapse off of dendrite. I have a handful of users. I can help test it.