Report: Migration YNH4>11 and ARM>x86 w/ Nextcloud & Grafana

I just completed a migration from:
YNH4.4 on an Odroid HC1 (XU4 based ARM)
To:
YNH11.2 on a ThinkCentre (Intel Core i5 / AMD64)

There were numerous challenges, all of which I overcame (or so it appears so far). Some of them were unique to my setup and others appear to be common to YNH, Nextcloud, and Grafana users. Some of those could be improved upon by YNH, but mostly I write this to say thank you to everyone who works so hard to produce all of this software (the teams at Debian, YNH, Nextcloud, Grafana, and a zillion others).

The late timing of the upgrade was due to the timing of Debian availability on the ARM board, and YNH requirements to move to Debian. I couldn’t upgrade to Debian 11 at first because YNH didn’t support it, and then because my ARM board didn’t have a working kernel for it. In the mean time, I decided after years of success (including my most recent run of 845 days of uptime) that I was ready to invest slightly more money into my hardware setup for more speed, and better software compatibility. I chose the ThinkCentre M720q as the replacement but didn’t have a long enough block of time to do the upgrade until this week.

Because of potential challenges with upgrading the ARM box to Debian 11, I decided to try to do all of the processes at once: switch/upgrade the hardware, upgrade the software, and migrate the data. This was a bit like throwing the proverbial long bomb, but much to my surprise, it worked with some obstacles that I was able to overcome. Here are some notes covering issues I encountered, some of which involved hours of work to fix, but I’ll summarize briefly with the hope of benefiting others:

1: The Yunohost image here: Install YunoHost | Yunohost Documentation does not work correctly with UEFI systems. There is no such indication about that problem but some Google searching indicates numerous problems. The solution was to download the net-install version of Debian 11 directly from Debian. That flashed correctly using dd to a thumb drive which correctly installed on the new machine. I then installed YNH successfully via:

curl https://install.yunohost.org | bash

SUGGESTION: If YNH isn’t going to fix the UEFI functionality of the image such that the USB stick boots using UEFI and the partition/format process creates an install that correctly works with UEFI, a warning should be placed on the above-referenced page to alert people of the workaround.

2: I restored the backup from the old machine. This worked surprisingly well, all things considered (different architecture, different OS, different YNH version). Because the actual restore process itself worked, I will call this part a success. Below are several things that didn’t happen and/or were broken after the restore process, along with several surprising successes.

3: Network configuration was not retained. Thus I had to manually change it to the static IP and routing I used on the old box.

4: Surprisingly, my ssh configuration made it to the new box okay. I was able to log in after deleting ~/.ssh/known-hosts (or the relevant information therein, which was really only this box).

5: Grafana did not work after restoration. There were two reasons for this. First, there was a user sync error which prevented login. After a lot of googling about it, I realized I hadn’t updated the app in YNH, which was still on 9.x. Updating to 10.x fixed the problem so I could log in.

6: Second, the backup and restore process does not copy influxdb data. I recall seeing a message about it somewhere, but I can’t find it now. Regardless, I had to manually back up the data from /var/lib/influxdb and restore it manually to the new box. No other steps were required than that. It now works correctly and began receiving data from other devices immediately.

7: Nextcloud ran immediately using the old version (22.x). The upgrade from 22 to 28 was not trouble free. First, I successfully updated all of the plugins. Then the upgrade failed due to config_is_read_only being set to true in /var/www/nextcloud/config/config.php. Setting it to false allowed me to get to the second failure: one of the plugins (plain text editor) caused a failure. I deleted that plugin and then the upgrade worked. Each of the failures was on a different version increment.

SUGGESTION: When upgrades need to go through multiple versions, ask where to stop or do them one at a time or something to make this a little smoother.

8: After upgrade, Nextcloud CLI did not work due to mismatched PHP versions and configuration. There were two specific fixes required. First, instead of calling php, the CLI requires calling php8.1. Second, the php configuration needs to be updated with apc.enable_cli=1 in /etc/php/8.1/conf.d/20-apcu.ini (or some other sensible location, but that’s where I put it). My cron jobs had to be updated accordingly.

9: Speaking of cron jobs, they were not migrated. I had to manually migrate my cron jobs.

10: Not a YNH issue, but Debian 11 no longer supplies rsnapshot in main. I had to add backports which triggers an error in YNH.

11: Also not a YNH issue, usbmount isn’t available packaged for Debian 11. Am I the only one who wants automount to work on the command line?

I think this completes most of my notes / experiences. It took some work, but I finally got the job done. Based on my past experiences, I expect things to run smoothly from here on out. Thank you again to all who work to keep this all maintained!

V-

2 Likes