Migrating from one Nextcloud to another
From time to time you might find it useful to migrate from an old installation, to a new one. If you have a small number of users, this is probably easiest to do manually. This article describes two possible methods.
Copy everything method
Start by putting Nextcloud into maintenance mode and wait 10 minutes.
- Copy all files (this might take some time).
- Dump the database.
- Paste all files to new server.
- Import database on new server.
- Check all values in config/config.php file and change any entries that are now misconfigured (e.g. database credentials, data directory etc...).
- Change DNS to point to new server (as required).
- Take Nextcloud out of maintenance mode.
Hopefully your migration is now complete.
Start by deploying a new installation of Nextcloud.
- For this article I've created a new subdomain, so that I can migrate users one at a time without upsetting those who are still using the old instance throughout the transition.
- Add new users, based on the users from the old instance of Nextcloud, remember to give them the same quota.
You will now need to reconfigure any Nextcloud clients so that they point to the new instance of Nextcloud.
- Uninstall the ownCloud client (if applicable).
- Install the Nexcloud client for your operating system (if you haven't already).
- Run the newly installed client.
Configure the client to synchronise the same local folder, to the new Nextcloud server.
Decommission the old Nextcloud
To avoid any confusion, it is now good practice to prevent access to the old instance of Nextcloud.
- Rename the root directory on the web server (e.g. rename to NextcloudBAK).
Thanks for visiting.