My YunoHost server
Hardware: VPS bought online
YunoHost version: 18.104.22.168
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
After a failed synapse upgrade, I can’t restore from backup. When restoring, I get a “Nothing was restored” error message and the following logs:
Crucial error message seems to be:
: File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/posixbase.py", line 19, in <module>
from twisted.internet import error, tcp, udp
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/tcp.py", line 38, in <module>
from twisted.internet._newtls import (
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/_newtls.py", line 18, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/protocols/tls.py", line 45, in <module>
from twisted.internet._sslverify import _setAcceptableProtocols
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/_sslverify.py", line 1829, in <module>
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/_sslverify.py", line 1808, in fromOpenSSLCipherString
SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3,
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/twisted/internet/_sslverify.py", line 1735, in _expandCipherString
ctx = SSL.Context(method)
File "/opt/yunohost/matrix-synapse/lib/python3.7/site-packages/OpenSSL/SSL.py", line 674, in __init__
res = _lib.SSL_CTX_set_ecdh_auto(context, 1)
AttributeError: module 'lib' has no attribute 'SSL_CTX_set_ecdh_auto'
I also can’t install new instance of synapse because there are some leftovers from the previous installation:
The user ‘synapse’ already exists
I can’t delete that user:
$ sudo yunohost user delete synapse
Error: Unknown user: synapse
EDIT: I retried the fresh installation and it worked. Now, to somehow recover the data from backup…
I managed to solve this issue by using the following steps:
- Download the backup
- Install a fresh instance of synapse
- Stop the matrix-synapse service
- Download the contents of
- Unpack the backup from step 1. Then, replace the contents of the
apps/synapse/backup/opt/yunohost/matrix-synapse/lib with the files downloaded in step 4
- Replace the contents of
app/synapse/backup/opt/yunohost/matrix-synapse/lib/pyhon3.7/site-packages/jinja2 with this: https://github.com/pallets/jinja/archive/refs/tags/3.0.1.tar.gz
- Tar the unpacked modified backup directory and upload it in place of the original one to
The restore went green and I can see some of the old messages. I seem to have lost the uploaded media, though
Nice that you have your Matrix back!
Uploads are in the
The files are encrypted by the clients before they are sent to Synapse, so Synapse only stores the encrypted data.
Are there files in those directories? If not, do you see them in the backup?
Ah. There are three directories:
the third one is the largest. But the first one already has things in it… not sure if I can merge them somehow?
The directories you mention, are they in the backup or in the
In the latter case, do you think there are already many new uploads? I think those are in the directory without a timestamp.
I would myself: create a backup directory, copy things from the first dir (without timestamp) to the backup dir. Then copy things from the 20221005-dir to the first dir, and check whether you got your uploads back.
I decided against doing any merging… I’ll try to be mindful of that directory the next time an update fails
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.