element-hq / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://element-hq.github.io/synapse
GNU Affero General Public License v3.0
1.52k stars 186 forks source link

Older Synapse homerserver.db migrate to current postgres. #17257

Closed stonewalljones closed 5 months ago

stonewalljones commented 5 months ago

Description

I'm attempting to migrate from an older deb based install to a more flexible docker based install using matrix-anisble.

When I attempt to migrate my homeserver.db I get:

TASK [custom/matrix-synapse : Import SQLite database into Postgres] ********************************************************************************************************************************************************************************************************************
fatal: [matrix.stonewall.pw]: FAILED! => changed=false
  cmd:
  - docker
  - run
  - --rm
  - --name=matrix-synapse-migrate
  - --log-driver=none
  - --user=999:1000
  - --cap-drop=ALL
  - --network=matrix-homeserver
  - --entrypoint=python
  - --mount
  - type=bind,src=/matrix/synapse/config,dst=/data
  - --mount
  - type=bind,src=/matrix/synapse/config,dst=/matrix-media-store-parent/media-store
  - --mount
  - type=bind,src=/root/homeserver.db,dst=/tmp/homeserver.db
  - localhost/matrixdotorg/synapse:v1.108.0-customized
  - /usr/local/bin/synapse_port_db
  - --sqlite-database
  - /tmp/homeserver.db
  - --postgres-config
  - /data/homeserver.yaml
  delta: '0:00:36.606400'
  end: '2024-06-01 05:37:26.266745'
  msg: non-zero return code
  rc: 5
  start: '2024-06-01 05:36:49.660345'
  stderr: |-
    2024-06-01 05:37:23,476 - synapse.config.key - 160 - WARNING - This server is configured to use 'matrix.org' as its trusted key server via the
    'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
    server since it is long-lived, stable and trusted. However, some admins may
    wish to use another server for this purpose.

    To suppress this warning and continue using 'matrix.org', admins should set
    'suppress_key_server_warning' to 'true' in homeserver.yaml.
    --------------------------------------------------------------------------------
    2024-06-01 05:37:23,606 - synapse.storage.prepare_database - 135 - INFO - ('main', 'state'): Checking existing schema version
    2024-06-01 05:37:23,609 - synapse.storage.prepare_database - 139 - INFO - ('main', 'state'): Existing schema is 78 (+4 deltas)
    2024-06-01 05:37:23,609 - synapse.storage.databases.main - 391 - INFO - Checking database for consistency with configuration...
    2024-06-01 05:37:23,611 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v78
    2024-06-01 05:37:23,613 - synapse.storage.prepare_database - 524 - INFO - Running 78/03event_extremities_constraints.py:run_create
    2024-06-01 05:37:23,797 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v79
    2024-06-01 05:37:23,798 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 79/03_read_write_locks_triggers.sql.sqlite
    2024-06-01 05:37:23,815 - synapse.storage.prepare_database - 524 - INFO - Running 79/04_mitigate_stream_ordering_update_race.py:run_create
    2024-06-01 05:37:23,816 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 79/05_read_write_locks_triggers.sql.sqlite
    2024-06-01 05:37:23,820 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v80
    2024-06-01 05:37:23,821 - synapse.storage.prepare_database - 541 - INFO - Applying schema 80/01_users_alter_locked.sql
    2024-06-01 05:37:23,827 - synapse.storage.prepare_database - 541 - INFO - Applying schema 80/02_scheduled_tasks.sql
    2024-06-01 05:37:23,831 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v81
    2024-06-01 05:37:23,832 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v82
    2024-06-01 05:37:23,832 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/02_scheduled_tasks_index.sql
    2024-06-01 05:37:23,836 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/04_add_indices_for_purging_rooms.sql
    2024-06-01 05:37:23,839 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/05gaps.sql
    2024-06-01 05:37:23,843 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v83
    2024-06-01 05:37:23,844 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/01_drop_old_tables.sql
    2024-06-01 05:37:23,862 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 83/03_instance_name_receipts.sql.sqlite
    2024-06-01 05:37:23,868 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/05_cross_signing_key_update_grant.sql
    2024-06-01 05:37:23,874 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/06_event_push_summary_room.sql
    2024-06-01 05:37:23,878 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v84
    2024-06-01 05:37:23,879 - synapse.storage.prepare_database - 541 - INFO - Applying schema 84/02_auth_links_index.sql
    2024-06-01 05:37:23,883 - synapse.storage.prepare_database - 541 - INFO - Applying schema 84/04_access_token_index.sql
    2024-06-01 05:37:23,887 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v85
    2024-06-01 05:37:23,887 - synapse.storage.prepare_database - 541 - INFO - Applying schema 85/01_add_suspended.sql
    2024-06-01 05:37:23,895 - synapse.storage.prepare_database - 568 - INFO - Schema now up to date
    2024-06-01 05:37:23,900 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for receipts_linearized(stream_id): 1224850
    2024-06-01 05:37:23,900 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): 916561
    2024-06-01 05:37:23,902 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): -186403
    2024-06-01 05:37:23,903 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for ex_outlier_stream(event_stream_ordering): -186408
    2024-06-01 05:37:23,910 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_event_stream(stream_id): 7
    2024-06-01 05:37:24,422 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for pushers(id): 13770
    2024-06-01 05:37:24,423 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for deleted_pushers(stream_id): 13463
    2024-06-01 05:37:24,424 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_stream(stream_id): 39
    2024-06-01 05:37:24,427 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules(id): 25
    2024-06-01 05:37:24,428 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_enable(id): 33
    2024-06-01 05:37:24,431 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_account_data(stream_id): 170043
    2024-06-01 05:37:24,432 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for account_data(stream_id): 170041
    2024-06-01 05:37:24,432 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_tags_revisions(stream_id): 134110
    2024-06-01 05:37:24,434 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_room_stream(stream_id): 7
    2024-06-01 05:37:24,434 - synapse.storage.databases.main.event_push_actions - 1242 - INFO - Searching for stream ordering 1 month ago
    2024-06-01 05:37:24,438 - synapse.storage.databases.main.event_push_actions - 1246 - INFO - Found stream ordering 1 month ago: it's 909863
    2024-06-01 05:37:24,438 - synapse.storage.databases.main.event_push_actions - 1249 - INFO - Searching for stream ordering 1 day ago
    2024-06-01 05:37:24,439 - synapse.storage.databases.main.event_push_actions - 1253 - INFO - Found stream ordering 1 day ago: it's 916348
    Pending background updates exist in the SQLite3 database. Please start Synapse again and wait until every update has finished before running this script.
  stderr_lines: <omitted>
  stdout: Preparing sqlite3...
  stdout_lines: <omitted> 

Attempting to migrate again gets me this:

fatal: [matrix.stonewall.pw]: FAILED! => changed=false
  cmd:
  - docker
  - run
  - --rm
  - --name=matrix-synapse-migrate
  - --log-driver=none
  - --user=999:1000
  - --cap-drop=ALL
  - --network=matrix-homeserver
  - --entrypoint=python
  - --mount
  - type=bind,src=/matrix/synapse/config,dst=/data
  - --mount
  - type=bind,src=/matrix/synapse/config,dst=/matrix-media-store-parent/media-store
  - --mount
  - type=bind,src=/root/homeserver.db,dst=/tmp/homeserver.db
  - localhost/matrixdotorg/synapse:v1.108.0-customized
  - /usr/local/bin/synapse_port_db
  - --sqlite-database
  - /tmp/homeserver.db
  - --postgres-config
  - /data/homeserver.yaml
  delta: '0:00:37.542824'
  end: '2024-06-01 05:43:05.857860'
  msg: non-zero return code
  rc: 5
  start: '2024-06-01 05:42:28.315036'
  stderr: |-
    2024-06-01 05:43:03,510 - synapse.config.key - 160 - WARNING - This server is configured to use 'matrix.org' as its trusted key server via the
    'trusted_key_servers' config option. 'matrix.org' is a good choice for a key
    server since it is long-lived, stable and trusted. However, some admins may
    wish to use another server for this purpose.

    To suppress this warning and continue using 'matrix.org', admins should set
    'suppress_key_server_warning' to 'true' in homeserver.yaml.
    --------------------------------------------------------------------------------
    2024-06-01 05:43:03,636 - synapse.storage.prepare_database - 135 - INFO - ('main', 'state'): Checking existing schema version
    2024-06-01 05:43:03,639 - synapse.storage.prepare_database - 139 - INFO - ('main', 'state'): Existing schema is 85 (+1 deltas)
    2024-06-01 05:43:03,639 - synapse.storage.databases.main - 391 - INFO - Checking database for consistency with configuration...
    2024-06-01 05:43:03,639 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v85
    2024-06-01 05:43:03,641 - synapse.storage.prepare_database - 568 - INFO - Schema now up to date
    2024-06-01 05:43:03,650 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for receipts_linearized(stream_id): 1224850
    2024-06-01 05:43:03,652 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): 916561
    2024-06-01 05:43:03,654 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): -186403
    2024-06-01 05:43:03,655 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for ex_outlier_stream(event_stream_ordering): -186408
    2024-06-01 05:43:03,664 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_event_stream(stream_id): 7
    2024-06-01 05:43:04,273 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for pushers(id): 13770
    2024-06-01 05:43:04,274 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for deleted_pushers(stream_id): 13463
    2024-06-01 05:43:04,275 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_stream(stream_id): 39
    2024-06-01 05:43:04,278 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules(id): 25
    2024-06-01 05:43:04,279 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_enable(id): 33
    2024-06-01 05:43:04,281 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_account_data(stream_id): 170043
    2024-06-01 05:43:04,282 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for account_data(stream_id): 170041
    2024-06-01 05:43:04,283 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_tags_revisions(stream_id): 134110
    2024-06-01 05:43:04,285 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_room_stream(stream_id): 7
    2024-06-01 05:43:04,286 - synapse.storage.databases.main.event_push_actions - 1242 - INFO - Searching for stream ordering 1 month ago
    2024-06-01 05:43:04,289 - synapse.storage.databases.main.event_push_actions - 1246 - INFO - Found stream ordering 1 month ago: it's 909863
    2024-06-01 05:43:04,289 - synapse.storage.databases.main.event_push_actions - 1249 - INFO - Searching for stream ordering 1 day ago
    2024-06-01 05:43:04,290 - synapse.storage.databases.main.event_push_actions - 1253 - INFO - Found stream ordering 1 day ago: it's 916349
    Pending background updates exist in the SQLite3 database. Please start Synapse again and wait until every update has finished before running this script.
  stderr_lines: <omitted>
  stdout: Preparing sqlite3...
  stdout_lines: <omitted>

I don't believe this is an issue directly related to using matrix-anisble since it does pear to be actually editing the homeserver.db files based on modify time.

Steps to reproduce

Homeserver

matrix.stonewall.pw

Synapse Version

DB version: {"server_version":"1.87.0","python_version":"3.7.3"} Migration Version 1.108

Installation Method

Debian packages from packages.matrix.org

Database

SQLite

Workers

Single process

Platform

debian LXC container

Configuration

No response

Relevant log output

2024-06-01 05:37:23,606 - synapse.storage.prepare_database - 135 - INFO - ('main', 'state'): Checking existing schema version
    2024-06-01 05:37:23,609 - synapse.storage.prepare_database - 139 - INFO - ('main', 'state'): Existing schema is 78 (+4 deltas)
    2024-06-01 05:37:23,609 - synapse.storage.databases.main - 391 - INFO - Checking database for consistency with configuration...
    2024-06-01 05:37:23,611 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v78
    2024-06-01 05:37:23,613 - synapse.storage.prepare_database - 524 - INFO - Running 78/03event_extremities_constraints.py:run_create
    2024-06-01 05:37:23,797 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v79
    2024-06-01 05:37:23,798 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 79/03_read_write_locks_triggers.sql.sqlite
    2024-06-01 05:37:23,815 - synapse.storage.prepare_database - 524 - INFO - Running 79/04_mitigate_stream_ordering_update_race.py:run_create
    2024-06-01 05:37:23,816 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 79/05_read_write_locks_triggers.sql.sqlite
    2024-06-01 05:37:23,820 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v80
    2024-06-01 05:37:23,821 - synapse.storage.prepare_database - 541 - INFO - Applying schema 80/01_users_alter_locked.sql
    2024-06-01 05:37:23,827 - synapse.storage.prepare_database - 541 - INFO - Applying schema 80/02_scheduled_tasks.sql
    2024-06-01 05:37:23,831 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v81
    2024-06-01 05:37:23,832 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v82
    2024-06-01 05:37:23,832 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/02_scheduled_tasks_index.sql
    2024-06-01 05:37:23,836 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/04_add_indices_for_purging_rooms.sql
    2024-06-01 05:37:23,839 - synapse.storage.prepare_database - 541 - INFO - Applying schema 82/05gaps.sql
    2024-06-01 05:37:23,843 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v83
    2024-06-01 05:37:23,844 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/01_drop_old_tables.sql
    2024-06-01 05:37:23,862 - synapse.storage.prepare_database - 549 - INFO - Applying engine-specific schema 83/03_instance_name_receipts.sql.sqlite
    2024-06-01 05:37:23,868 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/05_cross_signing_key_update_grant.sql
    2024-06-01 05:37:23,874 - synapse.storage.prepare_database - 541 - INFO - Applying schema 83/06_event_push_summary_room.sql
    2024-06-01 05:37:23,878 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v84
    2024-06-01 05:37:23,879 - synapse.storage.prepare_database - 541 - INFO - Applying schema 84/02_auth_links_index.sql
    2024-06-01 05:37:23,883 - synapse.storage.prepare_database - 541 - INFO - Applying schema 84/04_access_token_index.sql
    2024-06-01 05:37:23,887 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v85
    2024-06-01 05:37:23,887 - synapse.storage.prepare_database - 541 - INFO - Applying schema 85/01_add_suspended.sql
    2024-06-01 05:37:23,895 - synapse.storage.prepare_database - 568 - INFO - Schema now up to date
    2024-06-01 05:37:23,900 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for receipts_linearized(stream_id): 1224850
    2024-06-01 05:37:23,900 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): 916561
    2024-06-01 05:37:23,902 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): -186403
    2024-06-01 05:37:23,903 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for ex_outlier_stream(event_stream_ordering): -186408
    2024-06-01 05:37:23,910 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_event_stream(stream_id): 7
    2024-06-01 05:37:24,422 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for pushers(id): 13770
    2024-06-01 05:37:24,423 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for deleted_pushers(stream_id): 13463
    2024-06-01 05:37:24,424 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_stream(stream_id): 39
    2024-06-01 05:37:24,427 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules(id): 25
    2024-06-01 05:37:24,428 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_enable(id): 33
    2024-06-01 05:37:24,431 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_account_data(stream_id): 170043
    2024-06-01 05:37:24,432 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for account_data(stream_id): 170041
    2024-06-01 05:37:24,432 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_tags_revisions(stream_id): 134110
    2024-06-01 05:37:24,434 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_room_stream(stream_id): 7
    2024-06-01 05:37:24,434 - synapse.storage.databases.main.event_push_actions - 1242 - INFO - Searching for stream ordering 1 month ago
    2024-06-01 05:37:24,438 - synapse.storage.databases.main.event_push_actions - 1246 - INFO - Found stream ordering 1 month ago: it's 909863
    2024-06-01 05:37:24,438 - synapse.storage.databases.main.event_push_actions - 1249 - INFO - Searching for stream ordering 1 day ago
    2024-06-01 05:37:24,439 - synapse.storage.databases.main.event_push_actions - 1253 - INFO - Found stream ordering 1 day ago: it's 916348
    Pending background updates exist in the SQLite3 database. Please start Synapse again and wait until every update has finished before running this script.
  stderr_lines: <omitted>
  stdout: Preparing sqlite3...
  stdout_lines: <omitted>

2024-06-01 05:43:03,636 - synapse.storage.prepare_database - 135 - INFO - ('main', 'state'): Checking existing schema version
    2024-06-01 05:43:03,639 - synapse.storage.prepare_database - 139 - INFO - ('main', 'state'): Existing schema is 85 (+1 deltas)
    2024-06-01 05:43:03,639 - synapse.storage.databases.main - 391 - INFO - Checking database for consistency with configuration...
    2024-06-01 05:43:03,639 - synapse.storage.prepare_database - 433 - INFO - Applying schema deltas for v85
    2024-06-01 05:43:03,641 - synapse.storage.prepare_database - 568 - INFO - Schema now up to date
    2024-06-01 05:43:03,650 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for receipts_linearized(stream_id): 1224850
    2024-06-01 05:43:03,652 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): 916561
    2024-06-01 05:43:03,654 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for events(stream_ordering): -186403
    2024-06-01 05:43:03,655 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for ex_outlier_stream(event_stream_ordering): -186408
    2024-06-01 05:43:03,664 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_event_stream(stream_id): 7
    2024-06-01 05:43:04,273 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for pushers(id): 13770
    2024-06-01 05:43:04,274 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for deleted_pushers(stream_id): 13463
    2024-06-01 05:43:04,275 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_stream(stream_id): 39
    2024-06-01 05:43:04,278 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules(id): 25
    2024-06-01 05:43:04,279 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for push_rules_enable(id): 33
    2024-06-01 05:43:04,281 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_account_data(stream_id): 170043
    2024-06-01 05:43:04,282 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for account_data(stream_id): 170041
    2024-06-01 05:43:04,283 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for room_tags_revisions(stream_id): 134110
    2024-06-01 05:43:04,285 - synapse.storage.util.id_generators - 99 - INFO - Initialising stream generator for un_partial_stated_room_stream(stream_id): 7
    2024-06-01 05:43:04,286 - synapse.storage.databases.main.event_push_actions - 1242 - INFO - Searching for stream ordering 1 month ago
    2024-06-01 05:43:04,289 - synapse.storage.databases.main.event_push_actions - 1246 - INFO - Found stream ordering 1 month ago: it's 909863
    2024-06-01 05:43:04,289 - synapse.storage.databases.main.event_push_actions - 1249 - INFO - Searching for stream ordering 1 day ago
    2024-06-01 05:43:04,290 - synapse.storage.databases.main.event_push_actions - 1253 - INFO - Found stream ordering 1 day ago: it's 916349
    Pending background updates exist in the SQLite3 database. Please start Synapse again and wait until every update has finished before running this script.
  stderr_lines: <omitted>
  stdout: Preparing sqlite3...
  stdout_lines: <omitted>

Anything else that would be useful to know?

No response

anoadragon453 commented 5 months ago

I feel the error presented in fairly clear?

Please start Synapse again and wait until every update has finished before running this script.

Since you updated the codebase, you'll need to run the new migrations (on SQLite) before the SQLite->Postgres script can be run, as it can only be run on a SQLite DB with the schema expected by the later codebase.

So either start Synapse using SQLite and run the migrations. Or use the SQLite->Postgres script from your old Debian install and then give that Postgres DB to your new docker installation to run DB migrations on.

Also, please use #synapse:matrix.org for support requests.