App upgrades are failing when attempting to create backups

Error description

Attempting to upgrade apps from within the YunoHost admin panel leads to an error message and the apps fail to upgrade. The error message reads:

Could not complete the operation ‘Upgrade the ‘navidrome’ app’. Please provide the full log of this operation by clicking here to get help

Further details within the YunoHost error log viewer read:

Error An error occurred inside the app upgrade script

Sample logs: gitea, nextcloud, navidrome, lutim

My YunoHost server

  • Hardware: Old laptop or computer
  • YunoHost version: 4.0.4
  • I have access to my server: Through SSH (and via direct access if needed)
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: yes
    • If yes, please explain: behind a Raspberry Pi reverse proxy but upgrading has previously worked while behind this proxy and I don’t think I’ve made any such changes

Steps to reproduce

  1. Log in to the YunoHost admin panel
  2. Go to System update -> applications and click the “update” button next to an app. Confirm your choice.

Expected behavior

The app automatically updates.


Sample logs: gitea, nextcloud, navidrome, lutim

Extra information

The logs seem to indicate that the automatic pre-upgrade backups are not completing properly.

When I go to the “Backup” menu in the YunoHost admin panel and select “Local archives”, I get an additional internal error, which I am including here because backups seem to be the problem with the app updates:


GET /backup/archives


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/", line 489, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/", line 588, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/", line 2287, in backup_list
    archives = sorted(glob("%s/*.tar.gz" % ARCHIVES_PATH), key=lambda x: os.path.getctime(x))
  File "/usr/lib/moulinette/yunohost/", line 2287, in 
    archives = sorted(glob("%s/*.tar.gz" % ARCHIVES_PATH), key=lambda x: os.path.getctime(x))
  File "/usr/lib/python2.7/", line 72, in getctime
    return os.stat(filename).st_ctime
OSError: [Errno 2] No such file or directory: '/home/yunohost.backup/archives/20200816-211508.tar.gz'

That sounds like maybe you (unless it’s a bug somewhere else) deleted some files .info.json file in the backup directory without deleting the .tar.gz counterpart or vice-versa ?

My most recent YunoHost backup was on an external USB drive, mounted at /media/external-backup. That drive was not mounted while I tried to run the upgrades above. /home/yunohost.backup/archives/20200816-211508.tar.gz was apparently a symlink to that mounted drive, and I guess it critically failed when the drive wasn’t mounted.

This seems a little extreme, especially since I haven’t instructed YunoHost not to use the /home/yunohost.backup/ directory for backups; I’m surprised it didn’t just fallback to that.

At any rate, mounting the external backup drive cleared up the errors and allowed me to upgrade apps as expected.

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