# Synapse restore from backup fails after failed upgrade

**URL:** https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627
**Category:** Support apps
**Tags:** synapse, restore-backup, english
**Created:** [July 16, 2026, 3:03am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627 "2026-07-16T03:03:19Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![qrulf](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/q/ee7513/32.png) [@qrulf](https://forum.yunohost.org/u/qrulf)
#### Post date: [July 16, 2026, 3:03am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/1 "2026-07-16T03:03:19Z")

</div>

**What app is this about, and its version** : synapse 1.53  
**What YunoHost version are you running** : 12.1.40.1  
**What type of hardware are you using** : Old laptop or computer

### Describe your issue

Upgrading synapse failed due to connection issues.  
Then restoring the backup also failed.  
Apparently it has something to do with the go version.

Any help appreciated. Link to complete log below.

```auto
2026-07-16 04:52:58,463: DEBUG - + pushd /var/www/synapse/lk_jwt
2026-07-16 04:52:58,464: DEBUG - /var/www/synapse/lk_jwt /home/yunohost.backup/tmp/synapse-pre-upgrade2/apps/synapse/backup
2026-07-16 04:52:58,464: DEBUG - + ynh_hide_warnings ynh_exec_as_app go build -o lk-jwt-service .
2026-07-16 04:52:58,464: DEBUG - + ynh_exec_as_app go build -o lk-jwt-service .
2026-07-16 04:52:58,464: 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 .
2026-07-16 04:52:58,489: DEBUG - go: errors parsing go.mod:
2026-07-16 04:52:58,489: DEBUG - /var/www/synapse/lk_jwt/go.mod:3: invalid go version '1.25.0': must match format 1.23
2026-07-16 04:52:58,489: DEBUG - /var/www/synapse/lk_jwt/go.mod:5: unknown directive: toolchain
2026-07-16 04:52:58,491: DEBUG - + ynh_exit_properly
2026-07-16 04:52:58,491: DEBUG - + [[restore =~ ^install$|^upgrade$|^restore$]]
2026-07-16 04:52:59,096: ERROR - Could not restore synapse: An error occured inside the app restore script

```

### Share relevant logs or error messages

[https://paste.yunohost.org/raw/kacerizixa](https://paste.yunohost.org/raw/kacerizixa)

---

<div class="post-metadata">

### Author: ![Josue](https://forum.yunohost.org/user_avatar/forum.yunohost.org/josue/32/933_2.png) [@Josue](https://forum.yunohost.org/u/Josue)
#### Post date: [July 16, 2026, 10:04am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/2 "2026-07-16T10:04:17Z")

</div>

Hello,

Seem exactly the same issue than [Failed to update 1.129 to 1.130 · Issue #549 · YunoHost-Apps/synapse\_ynh · GitHub](https://github.com/YunoHost-Apps/synapse_ynh/issues/549). Could you confirm ?

---

<div class="post-metadata">

### Author: ![qrulf](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/q/ee7513/32.png) [@qrulf](https://forum.yunohost.org/u/qrulf)
#### Post date: [July 16, 2026, 4:28pm UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/3 "2026-07-16T16:28:56Z")

</div>

Thanks for your reply - yes it seems very much like the same error related to lk\_jwt. As one suggests on the link you provided I tried removing golang-go with apt and then apt autoremove as well, but it ends up missing go:

> Info: DEBUG - env: ‘go’: No such file or directory

Complete log:

[https://paste.yunohost.org/raw/amarotahon](https://paste.yunohost.org/raw/amarotahon)

And then after installing golang-go again - same situation as before, full log:

[https://paste.yunohost.org/raw/ijaluxucey](https://paste.yunohost.org/raw/ijaluxucey)

---

<div class="post-metadata">

### Author: ![Josue](https://forum.yunohost.org/user_avatar/forum.yunohost.org/josue/32/933_2.png) [@Josue](https://forum.yunohost.org/u/Josue)
#### Post date: [July 17, 2026, 9:23am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/4 "2026-07-17T09:23:57Z")

</div>

Hello,

The correct solution is to not install manually with APT golang. It’s expected to be installed as a resource. So now is seem that it’s not installed expected. Maybe it would be interesting to:

- Check if something exist in `/opt/goenv/versions/` with the command `ls /opt/goenv/versions/`.
- If there are anything it could have been removed at the remove so doing a restore with the option `--no-remove-on-failure` would help to understand what what is the state of the golang installation when it crash.

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [July 17, 2026, 10:52am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/5 "2026-07-17T10:52:47Z")

</div>

> 2026-07-16 18:21:41,061: 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 .

Path seems wrong, right? Shouldn’t it begin with `/opt/goenv/versions/...` instead of the ‘system’ go installation path ?

---

<div class="post-metadata">

### Author: ![Josue](https://forum.yunohost.org/user_avatar/forum.yunohost.org/josue/32/933_2.png) [@Josue](https://forum.yunohost.org/u/Josue)
#### Post date: [July 17, 2026, 8:24pm UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/6 "2026-07-17T20:24:38Z")

</div>

yes but it’s a bit more complicated, because it should be added in case `/opt/goenv/versions/..` exist but it seem not existing, that’s why it’s not in the path.

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [July 17, 2026, 10:48pm UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/7 "2026-07-17T22:48:35Z")

</div>

`tar -xOf /home/yunohost.backup/archives/synapse-pre-upgrade2.tar apps/synapse/settings/settings.yml | grep 'go_version'`

---

<div class="post-metadata">

### Author: ![Josue](https://forum.yunohost.org/user_avatar/forum.yunohost.org/josue/32/933_2.png) [@Josue](https://forum.yunohost.org/u/Josue)
#### Post date: [July 18, 2026, 9:31am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/8 "2026-07-18T09:31:14Z")

</div>

From which version was you trying to upgrade ?

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [August 2, 2026, 9:31am UTC](https://forum.yunohost.org/t/synapse-restore-from-backup-fails-after-failed-upgrade/42627/9 "2026-08-02T09:31:45Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
