Migration to new server or fresh install?

Dear Nextcloud experts,

I have been using a self hosted Nextcloud installation on my home server for a few years. Now I got new hardware and would like to run Nextcloud on my new home server.

Unfortunately, there was a time where I missed a few major updates of Nextcloud. I then started to try to catch up with the version numbers, but ran into some major problems. I am at version 21 now and I think the update from 20 to 21 created some problems. Some things are not working properly anymore and it feels like the installation is in a weird state. In order to be able to migrate, I would have to bring this installation up to version 24 first and then move it to the new server. Therefore, I am not sure, if migrating this installation to the new server is the best option. A fresh start on the new hardware sounds like the better option, but of course I do not want to lose all the data, calendars, contacts…

What would be your recommendation in this situation? Is there a way to do something in between, starting a fresh install to have a proper configuration but still import (some of) the data from the old server?

Thank you very much for your help!

First. If you want to save your e.g. public share urls you must find a way to upgrade Nextcloud 21 to 22, 23, 24 on the old server or on the new server. Open threads to solve the problems. Post details, logs, … If all works read backup and restore for migration.

Alternatively you can reinstall. You can easily include the files again. Also there are possibilities to export and import contacts and calendars.

You can rename your Nextcloud cloud.server.tld to cloudold.server.tld to use the old name for the new cloud if needed.

1 Like

Thank you for your response!
I am not taking advantage of the full functionality of Nextcloud, so shares for instance are not a problem. I hope, I am not forgetting something, but I think I really only rely on files, calendars and contacts. Maybe I start with an export of calendars and contacts and then tackle the updates to 22, 23, 24. The user files are part of the backup anyway. Then I can still decide to migrate or install fresh and import files, calendar and contacts. I am well aware of the linked documents to backup and restore, which are a great help.

For file migration you can use different ways.

You can e.g. copy them with scp, rsync, … and after that you must use on the second Nextcloud
sudo -u www-data php /path/to/nextcloud/occ files:rescan --all
that Nextcloud knows the data.

Also you can use e.g. a Nextcloud Client and all users can upload all data again. Also you can use features like federation but mostly it does not work well.

1 Like

if you manage to bring you existing installation to 24 another option exists - User migration - Apps - App Store - Nextcloud - other options with more manual steps still might be an option, especially in case you have lot of data…


Well, Fresh install, manual files uploads, occ…

This what i do almost at every hardware changes ( 2-3 years )

No doubt. Make a full fresh installation, then copy your files with scp and use occ to rescan them. Or alternatively, use a client synchronized with the new server, and upload everything in the sync folder of the client. Or use the web browser to upload files (slowest option).
For calendar and contacts, no problem: just export them from the old nextcloud and import in the new one.

This by far the fastest option, respect to trying to solve all the problems of a misconfigured nextcloud installation.

Thank you guys for all the input! I might be just moving the hard drive with the user data to the new server. That should make integrating the data very fast.

This sounds like a great option. Thank you for pointing this out! I was not aware of this app.