Error restoring funkwhale

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.11
How are you able to access your server: The webadmin
SSH

Describe your issue

After restoring the funkwhale application i receive the following error:
2025-01-28 11:40:13,074: WARNING - Jan 28 11:40:13 gunicorn[3769451]: Traceback (most recent call last):
2025-01-28 11:40:13,075: WARNING - Jan 28 11:40:13 gunicorn[3769451]: File “/var
/www/funkwhale/venv/bin/gunicorn”, line 5, in
2025-01-28 11:40:13,075: WARNING - Jan 28 11:40:13 gunicorn[3769451]: from gunicorn.app.wsgiapp import run
2025-01-28 11:40:13,075: WARNING - Jan 28 11:40:13 gunicorn[3769451]: ModuleNotFoundError: No module named ‘gunicorn’

Full log:
https://paste.yunohost.org/raw/huxawevaka

Before it, i had a similar problem (gunicorn) adter updating to yunohost12, I solve it regenerating python venv with:
yunohost app upgrade -F funkwhale

If the restore process doesn’t rollback, I can solve the problem after restoring using the command above.

Share relevant logs or error messages

https://paste.yunohost.org/raw/huxawevaka

There is a way, but it’s super stupid hence I don’t recommend it.

This is really a bad idea, are you sure whatever you’re doing is worth it? Perhaps a fresh install with content transplant is sufficient?

If however you feel super confident and adventurous you can edit the file /usr/lib/python3/dist-packages/yunohost/backup.py, locate the block that says

            else:
                self.targets.set_result("apps", app_instance_name, "Error")

                # Cleaning temporary scripts directory
                shutil.rmtree(tmp_workdir_for_app, ignore_errors=True)

                app_remove(app_instance_name, force_workdir=app_workdir)

                logger.error(failure_message_with_debug_instructions)

(else starts at line 1540 as of YunoHost version 12.0.11)
and comment out the line that calls app_remove.

Now, when you restore from cli (but not from WebAdmin for some reason :person_shrugging:) the app will be left in broken state after restore, allowing you the force-upgrade trick you mentioned.

1 Like

I solved by restoring the app after migration to yunohost 12 on the source server. I discored that after upgrading to 12 the backup was in error (there was no backup after update).

1 Like