Skip to content

Add script to extract Synapse configuration values#352

Open
hanthor wants to merge 1 commit intoelement-hq:mainfrom
hanthor:generic-migration
Open

Add script to extract Synapse configuration values#352
hanthor wants to merge 1 commit intoelement-hq:mainfrom
hanthor:generic-migration

Conversation

@hanthor
Copy link
Copy Markdown

@hanthor hanthor commented Apr 5, 2025

Fixes #340

Will need to make the migration docs split out for MDAD specific or more generic isntructions

This only supports migrating Synapse it pulls all values from homeserver.yaml

@hanthor hanthor requested a review from a team as a code owner April 5, 2025 10:42

servername=$(yq '.servername' "$homeserverconfig")
synapseHost=$(yq '(.public_baseurl | match "https://(.+)/").captures[0].string' "$homeserverconfig")
macaroon=$(yq '.macaroon_secret_key' "$homeserverconfig")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synapse supports _path suffixes for all secrets nowadays https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=macaroon#macaroon_secret_key_path . It would be great if the script could handle those automatically.

set -xe


targetDirectory="$1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the migration docs with your script usage please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Migration Guide for different kinds of legacy matrix installations

2 participants