What type of hardware are you using: Virtual machine What YunoHost version are you running: 11.3.0.2 (stable) How are you able to access your server: SSH
Describe your issue
I am having this issue Toasted server: Migration 0027_migrate_to_bookworm did not complete - basically I cannot run the YNH migration since the server we have is a container and some updates fail, possibly because we do not have full control/access over the server and the network config fails to update. Anyway there seems to be no solution other than buying a new VPS, but most only provide them with Debian 12.
Is it possible to restore the Yunohost 11.3.0.2 on a Debian 12 server and then run the migration?
Share relevant logs or error messages
CLARIFICATION:
Hm maybe I got a bit confused. I mean to install the latest Yunohost on a Debian 12 server, then restore my backups like the YNH config and users…if that would be ok. Considering these backups were made on Debian 11 with YNH 11.3.0.2
Oh well yet another issue. I cannot install the latest YNH with curl https://install.yunohost.org | bash on Debian 11 since it requires Debian 12…damn. Is there a way to grab the latest Debian 11 YNH package?
Just for the sake of it I tried installing the latest Yunohost on Debian 12. Then tried to restore the conf backup from the old Yunohost on Debian 11 and I got this nasty error:
Hmmmyeah i don’t remember the full story about this, but i seem to recall that the info.json is in fact in the tar archive but somehow yunohost can’t pick it up because of some technicality … are you able to manually extract it from the archive maybe ? And put it on the side with the same name as the .tar, something like auto_conf.info.json ?
Yes that’s exactly what I did. Put it in the same folder, and it has the same name as the .tar. Plus 0644 permissions that I see all backups for YNH have… I am now confused since idk if this is a Borg issue or not. But I will try to grab a backup directly from the old server, done with Yunohost, and see if that works.
For those who may wonder about extracting the .json and renaming it:
Extract the .json file from the archive (rename the archive with the one you want):
tar -xvf /home/yunohost.backup/archives/auto_conf.tar -C /home/yunohost.backup/archives --strip-components=4 home/yunohost.backup/tmp/auto_conf/info.json
Well bad news indeed…I tried to use a backup archive from Borg from a Debian 12 and latest YNH stable and same error. It means that the Borg backups are broken and that’s quite scary.
As for my initial question about restoring the old ynh backups to the new debian 12 ynh I managed to restore the configs (users, etc.) but I see errors when for example try to change a password for a user
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/moulinette/interfaces/api.py", line 473, in process
ret = self.actionsmap.process(arguments, timeout=30, route=_route)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 561, in process
return func(**arguments)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/yunohost/log.py", line 486, in func_wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/yunohost/user.py", line 579, in user_update
app_ssowatconf()
File "/usr/lib/python3/dist-packages/yunohost/app.py", line 1759, in app_ssowatconf
app_portal_domain = next(
^^^^^
StopIteration
I guess it is a bad idea to do it like that…I’ll try what @jarod5001 suggested.
Ok I am testing in a VM. I installed Debian 11 then did curl https://install.yunohost.org/bullseye | bash - restored successfully the config and data files. All but the apps. However I see no migration to do. I updated the YNH system and all that.
Ok so I did it. I will post here in case others face the same situation.
I made backups for all of the apps and the YNH install with Borg.
I bought a dedicated server from Hetzner who still provides Debian 11 images.
I installed the older YNH there with curl https://install.yunohost.org/bullseye | bash
Installed Borg, connected to Borgbase where my backups were.
Restored all backups from BorgBase.
Go to /etc/yunohost/migrations.yml and if the migration to Bookworm is set as “skipped” edit it and add “pending”. Else YNH thinks there is no migration to do.
Go to the YNH admin and run the updates and migrations.
After all is done, voilla, you have the new YNH and Debian 12 running.
I also moved them back to Webdock (hosting) after the migration.