Cannot restore synapse from backup because Go is missing

App version

Synapse, 1.157.2~ynh1

YunoHost version

12.1.41.2

Hardware

VPS bought online

Describe your issue

My synapse upgrade from 1.157.2~ynh1 to 1.160.0 failed because there were not enough space left on disk.
The restore process failed too.
After freeing up some disk space, the restore process keeps failing, because Go is apparently missing:

DEBUG - + sudo -u synapse env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COREPACK_ENABLE_DOWNLOAD_PROMPT=0 NPM_CONFIG_UPDATE_NOTIFIER=false go build -o lk-jwt-service .
DEBUG - env: ‘go’: No such file or directory

This topic describes a similar problem but didn’t find a solution in it.

My /opt/goenv/versions/ folder is empty.

Thanks in advance for your help.

Share relevant logs or error messages

Full restore log: https://paste.yunohost.org/raw/dazurazafo

Hello,
Anyone able to point me somewhere to help solve this problem?

Try restoring the archive in CLI with --no-remove-on-failure flag.

yunohost backup restore synapse-pre-upgrade1 --no-remove-on-failure

The app won’t work but it could help with debugging.
Once done, you could even try forcing the upgrade

yunohost app upgrade synapse -b --force

Thanks @otm33 !

After restoring the archive in CLI with --no-remove-on-failure I forced the upgrade and synapse is working again!

But after reconnect my differents clients (element on desktop, element on mobile), it’s look like an empty server (I loose all my channels/conversations).
Is there anything I can do to recover the data?
(It seems my backup contains the data… And folder /home/yunohost.app/synapse is still full of media)

Here’s how the story ends:
The synapse database was simply empty because it couldn’t be restored—the restore script failed before reaching that step.

So here are the steps to resolve this restoration issue if anyone else finds themselves in the same situation: (thanks a lot @otm33 for your help)
1- Check that you have enough available disk space :sweat_smile:
2- Restore the backup using the --no-remove-on-failure flag:
yunohost backup restore synapse-pre-upgrade1 --no-remove-on-failure
3- Force the application upgrade:
yunohost app upgrade synapse -b --force
4- Restore the database backup.