How to update an unsupported YunoHost 3.X and Debian 9?

Hello there,

Some context

I end up managing a YunoHost server for an non-profit association and it runs with YunoHost version 3.6 and Debian 9.

I found that it is not supported anymore while trying to under to install a new test server on a raspberrry pi with yunohost-stretch-3.4.2-rpi-stable.zip

I get errors while updating yunohost packages from https://forge.yunohost.org. After searching on the forum, I found that it’s not supported anymore from these links:

Questions

How can I manage to get the datas on the last Yunohost and debian version? (I have backups made by the old Yunohost and ssh access)

For now, I believe I will need to install a new server with the last YunoHost version and try to restore a backup on it as the main server cannot be upgraded anymore

Any feedback on this use case if someone had it?

1 Like

This seems to be the same case

Hello,
@jarod5001 is right, I faced the same problem two weeks ago, and solved it last week thanks to Yunohost Forum.
You just have to edit the file /usr/lib/moulinette/yunohost/data_migrations/0015_migrate_to_buster.py

#  if upgradable_system_packages:
#      raise YunohostError("migration_0015_system_not_fully_up_to_date")

then retry an update

No need to backup you system, Yunohost will do it for you.

Uuuuuh, not sure what you mean :thinking:

Hi, @Aleks must be right, i didn’t find any trace of backup in the log file of the update.
So you should backup your databefore updating

production server

Thanks for the feed back. (I missed it while searching). I will try the given info on the production server if I cannot setup a test server.

test server

Last week, I try to test up a test server an a pi2 and restore the backup made from the production server on it with no luck:

  • yunohost-stretch-3.4.2-rpi-stable.zip (lastest pi images yunohost 3.X available) => failed to restore some apps because some helpers used were added in 3.6

    Warning: ./remove: line 27: ynh_script_progression: command not found
    Warning: --file= wasn't deleted because it doesn't exist.
    
  • yunohost-buster-4.1.7.2-rpi-stable.img.zip => didn’t keep the error message but failed because I try to restore a “stretch backup” on “buster version” (debian package conflicts)

Using pi images was a bad idea… I will switch to “virtual machine” for this and a yunohost 3.6: https://build.yunohost.org/releases_archive/yunohost-stretch-3.6.4.6-amd64-stable.iso

Hello,

Thanks for the hint. This file does not exists on the server so I cannot use this trick unfortunately.

root@yuno3-6:~# ls -1 /usr/lib/moulinette/yunohost/data_migrations/
0001_change_cert_group_to_sslcert.py
0001_change_cert_group_to_sslcert.pyc
0002_migrate_to_tsig_sha256.py
0002_migrate_to_tsig_sha256.pyc
0003_migrate_to_stretch.py
0003_migrate_to_stretch.pyc
0004_php5_to_php7_pools.py
0004_php5_to_php7_pools.pyc
0005_postgresql_9p4_to_9p6.py
0005_postgresql_9p4_to_9p6.pyc
0006_sync_admin_and_root_passwords.py
0006_sync_admin_and_root_passwords.pyc
0007_ssh_conf_managed_by_yunohost_step1.py
0007_ssh_conf_managed_by_yunohost_step1.pyc
0008_ssh_conf_managed_by_yunohost_step2.py
0008_ssh_conf_managed_by_yunohost_step2.pyc
0009_decouple_regenconf_from_services.py
0009_decouple_regenconf_from_services.pyc
0010_migrate_to_apps_json.py
0010_migrate_to_apps_json.pyc
__init__.py
__init__.pyc

I end up installing the lastest YunoHost on a new VPS and will migrate all the data manually application by application. I tried restoring a backup instead on the postinstall and I (obviously) got:

root@yuno4-3:~# yunohost backup restore 20220308-081005
Error: This backup archive can not be restored because it comes from a too-old YunoHost version.

Next steps:
PITA will be migrating Nextcloud (and shares) and all the users to recreate

Dommage. Maybe it was in the file

0003_migrate_to_stretch.py

(see https://github.com/YunoHost/yunohost/blob/bde3c502acf7a892818c11ad369bb6c5d70218fe/src/yunohost/data_migrations/0003_migrate_to_stretch.py#L116)
on lines 116-120

  if " stretch " not in read_file("/etc/apt/sources.list"):
        self.apt_update()
        apt_list_upgradable = check_output("apt list --upgradable -a")
        if "upgradable" in apt_list_upgradable:
            raise YunohostError("migration_0003_system_not_fully_up_to_date")

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