Migrate from NC 20.0.14 to 30ish

I have a Ubuntu 18.04 server running Nextcloud. I updated the NC from 18.0.6 to 20.0.14 via a few upgrades. Now I’m hitting other upgrade stumbling blocks (need to upgrade PHP, MariaDB, etc) before I can update further.

The server has 60GB of data, a few users, maybe some docs created in OnlyOffice. It’s main point in life is file syncing between office branches.

What upgrade options do I have?

It looks like a step-by-step will be painful, long, and rabbit hole laden.

My current thought is to

  1. Build a new server (Ubuntu 24.04, current MariaDB, PHP 8 (.3?) .
  2. Add the new server to the NC clients.
  3. Have staff copy files to the new NC server.
  4. Remove the old NC sync point.
  5. Shut off server

Does anyone see issues here? Is there a better way to migrate for this scenario? Is there a preferred PHP version I should be aiming for?

Before step 2 you should backup the Nextcloud data folder and copy it to the new instance before extracting it there.
After extraction do an occ files:scan all to add the file names and locations into the database.
You also need to input the settings (mail, shares…) into the new instance.

Warning:
If you setup the clients to the new server with empty folders alle client files may be deleted.

Depending on the path you choose. Definitely upgrade on bare-metal could be demanding. But if you perform a server migration into a Docker install, upgrade all the way and later migrate to the destination server you can take over all the setting, shares without hitting any issues and simple restart process.

60GB of data is easily manageable even on the old desktop and you can perform all the update steps side-by-side with no impact on production (if do so take care about added data).

It is correct to reinstall, as you certainly do not want to upgrade from Nextcloud 20 via Nextcloud 21, 22, 23, 24, 25, 26, 27, 28, 29 to Nextcloud 30.

Note, however, that the internal structures such as user name, groups, shares etc. will be lost.

However, you can do the following:

  • Install e.g. Ubuntu 24.04 LTS with Nextcloud 30.0.1 and everything that is required for this.
  • Create the old users
  • Copy with Linux operating system files commands (cp, rsync, scp, …) the old files to /path/to/nextcloud/data/username/files
  • Execute sudo -u www-data php /path/to/nextcloud/occ files:scan --all
  • This will make the files visible in Nextcloud
  • Shares etc. are of course lost

Alternatively, all users can of course start without data and synchronise their data from local storage back to the new Nextcloud.

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