Move to a new install

Nextcloud version (eg, 20.0.5): 24.06
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): 2.4.56
PHP version (eg, 7.4): 7.4

The issue you are facing:
My nextcloud install is a little broken after an update failed. The front end works for the users but the back end has issues and errors.

I need to move my Nextcloud to a new host with more space (way too many movies and music) so was thinking about building a new instance on Debian 12. How easy would it be to transfer my users and data across from the old server to the new? Is there a process for this?

For transfer you can read Backup and Restore. You can transfer configs (e.g. apache2, Nextcloud, …), database (e.g. MariaDB) and data. For working you must use the same Nextcloud version on the old and on the new server. That is very important.

Nextcloud 24 does not support PHP 8.2 see here. So i think you must first upgrade your old Nextcloud 24 to Nextcloud 25. That works with Debian 11. Nextcloud 24 is End of Life see here.

If Nextcloud 25 works you can backup all and dump the database. On the new server (Debian 12) Nextcloud 25 is supported see here. You can use another name e.g. instead of oldcould.server.tld the name newcloud.server.tld set in config/config.php and apache2-conf. Then you must not destroy your old system. If all works you can also move the name (and ssl certificate) and then you can upgrade to Nextcloud 26 and maybe Nextcloud 27.

Another way:
If you are only concerned about the data and the users and not about the shares and other things e.g. deck, forms, contacts, … you can also set up a new Nextcloud 27 on the new server, create the users manually and restore only the data-directory. Then you just have to do sudo -u www-data php occ files:scan --all that Nextcloud knows all files. But shares etc. will all be lost as the database is completely new.

1 Like

Thanks, I will need to look into the errors then and try to get the update to 25 to work!

I just had another look. Nextcloud 25 is not supported by PHP 8.2 at all. For me it was so, but the updater updater.phar worked with Debian 12 and PHP 8.2.

Make a backup in any case. :coffee:

Just to add…
We had NC25 on PHP8.1 which NC26 doesn’t like.

So while the update from NC25 to NC26 went well, all halted on refresh.
Here we installed PHP8.2 and NC26 started alright.

This must have had something to do with your specific configuration. On my instance Nextcloud 26 is running just fine with PHP 8.1 and I will probably install PHP 8.2 once I upgrade my instance to Nextcloud 27.

1 Like