Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

upgrading from before 1.3.0 to 1.10.0 destroys all your rooms #6923

Closed
richvdh opened this issue Feb 14, 2020 · 3 comments
Closed

upgrading from before 1.3.0 to 1.10.0 destroys all your rooms #6923

richvdh opened this issue Feb 14, 2020 · 3 comments

Comments

@richvdh
Copy link
Member

richvdh commented Feb 14, 2020

the delete_old_current_state_events background update clears current_state_events of any rooms with no rows where membership='join'. But membership is only populated by the current_state_events_membership update, so this goes badly.

@richvdh
Copy link
Member Author

richvdh commented Feb 17, 2020

fixed by #6924

@richvdh richvdh closed this as completed Feb 17, 2020
@sandhose
Copy link
Member

Because the FreeBSD port is still on 1.10.0, I ran into this when I upgraded. Is there a way to recover from this? I'm the only user of my homeserver, there are not a lot of rooms to restore

@sandhose
Copy link
Member

I kinda got my HS running again. What I did is:

  • backup my database before doing anything
  • update the room_version in the rooms table to be 1 when the field was NULL to get past this error
  • try to rejoin all the rooms1
  • delete the entries in current_state_events for rooms I could not manage to join
  • re-join those rooms

Right now I'm figuring out other conflicts in the database, mainly in *_historical tables

curl -X GET 'https://HS/_matrix/client/r0/joined_rooms' | jq -r '.joined_rooms[]' | while read r
do 
  curl -X POST "https://HS/_matrix/client/r0/join/$r"
done

Footnotes

  1. basically something like this:

richvdh added a commit that referenced this issue Dec 1, 2020
It's important that we make sure our background updates happen in a defined
order, to avoid disasters like #6923.

Add an ordering to all of the background updates that have landed since #7190.
richvdh added a commit that referenced this issue Dec 1, 2020
It's important that we make sure our background updates happen in a defined
order, to avoid disasters like #6923.

Add an ordering to all of the background updates that have landed since #7190.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants