Upgrading NC across multiple releases

Hi, on my Raspi I am currently stuck with NC20, because its Raspian OS version is 9 = Stretch which allows MariaDB 10.1.x as highest version, whereas NC21 needs at least MariaDB 10.2.
My idea is to set it up completely new, with Raspian OS version 11 = Bullseye and newest NC version 24. But of course I want to keep my data.
So how to do this best? I guess I have to take the long way and install same old NC version 20 on new OS, then exchange the data directory with all of its files (/var/www/nextcloud/) and also the data base files (/var/lib/mysql/) and then upgrade NC step-by-step from one major release to another until newest version 24 is reached.
Or is a short way possible, e.g. install newest NC version 24, copy current data and data base directly to their places and start some magic script or upgrade command for data and data base upgrade? Or should I export/import the db stuff instead of copying?

Why not upgrade stretch to bullseye? It is not difficult. Make a backup and go for it. Search the internet for instructions.

Thanks but no, it has been running since 2015 and now it should be set up again.

Okay, your choice. Fyi, I’ve successfully survived through roughly that entire duration of time with the same NextcloudPi installation and the various Debian releases. Version to version is the process of maintaining nc. Keep backups and you’ll make your transition work. :beers:

Question is still, how to upgrade NC? One release after another or is it possible to skip releases? May this lead to data corruption? Anyone experiences or suggestions?

One after another. It is always the same answer friend. :heart:
Feel free to try otherwise, because it won’t let you.

1 Like