AMZ DIGICOM

Digital Communication

AMZ DIGICOM

Digital Communication

Why migrate to Nextcloud? Scenarios and instructions

PARTAGEZ

A Nextcloud migration generally involves transferring data from one Nextcloud server to another or moving from a solution like ownCloud to Nextcloud. The reasons can range from a hardware change to a change in hosting provider.

What are the reasons for a Nextcloud migration?

Migrating to Nextcloud or changing Nextcloud servers can be useful or necessary for different reasons. Most often, this is motivated by the desire to improve performance, increase security, or gain flexibility. Among the most common reasons for a server migration are:

  • Change hardware for better performance : When the existing infrastructure reaches its limits, for example due to an increase in the number of users or data volume, moving to more powerful servers can significantly improve speed and stability.
  • Migrate from a virtual environment to a physical server : Another common reason is the transfer of pre-configured software solutions running in a virtual environment to physical servers. The latter generally offer greater computing power.
  • Switch to another hosting service : A migration may be motivated by a change of Nextcloud provider, whether to reduce costs, obtain better support or due to a stricter privacy policy.
  • Take full advantage of Nextcloud features : this open source application offers many features and extension options thanks to its application ecosystem. It therefore represents a serious and powerful option compared to the various alternatives to Nextcloud available on the market.

Migrate Nextcloud: the different possible scenarios

There are different scenarios for a Nextcloud migration, depending on the origin and destination of the data. The most common are:

  • Migration from Nextcloud to Nextcloud : data is transferred from one Nextcloud server to another, for example to use more efficient hardware or to change hosting service. For this scenario, Nextcloud has offered an import/export function since version 24, which allows you to export data from an archive and migrate it to the new server.
  • Migrating from another platform to Nextcloud : this involves migrating from other Cloud solutions like ownCloud to take advantage of the active community, the Nextcloud application catalog and the scalability of Nextcloud. The data is then first exported from the previous platform, before being migrated to Nextcloud.
  • Migrating from a local database to Nextcloud : Data, applications and digital assets stored locally are transferred partially or entirely to a Nextcloud environment. The extent of migration depends mainly on the reasons for the change and the objectives associated with it.

Advice

With Managed Nextcloud, IONOS provides you with a reliable Cloud solution. You don't even have to worry about installing or maintaining the software! Benefit from a secure infrastructure on German server locations and tailor-made professional support.

Instructions: Migrate Nextcloud to another server

Migrating to another server requires careful planning and implementation. The following instructions show you step by step how to transfer your data to the new system. In all cases, it is recommended to make a backup of all important data before the migration, so that they can be restored without problem if necessary.

Step 1: Prepare the new server

  1. Install the operating system of your choice on the new server.
  2. Configure them components necessary: ​​Web server, PHP and the database of your choice (MySQL, MariaDB, PostgreSQL, Oracle).
  3. Make sure the version of PHP and any potential PHP extensions is compatible with your Nextcloud configuration.

Step 2: Put Nextcloud in maintenance mode

  1. Switch to Nextcloud maintenance mode on the existing server by running the following command:
sudo -u www-data php occ maintenance:mode --on

bash

  1. Wait a few minutes for all sync clients to detect maintenance mode. Next, shut down the web server you are running Nextcloud on.

Step 3: Backup and Transfer the Database

  1. Perform a backup from the database (dump) for your existing installation.
  2. Transfer the copy to the new server, then import it into the new database.

Step 4: Copy the Files

  1. Copy all files from your Nextcloud instance to the new server.
  2. Data files must retain their timestamp. Otherwise, clients will sync all files again after migration. To do this, use thersync sync tool :
rsync -avz --progress --times /chemin/vers/nextcloud/ /chemin-de-destination/

bash

  1. If the file paths change due to Nextcloud migration, it is necessary to also adapt these paths in the Nextcloud config.php file.
  2. Run the following command to correct any inconsistencies after migration:
sudo -u www-data php occ maintenance:repair

bash

Step 5: Verify Data Fingerprint

  1. Check in file config.php of the original system if a value has been set for data-fingerprint.
  2. If so, you need to run the following command on the new server:
sudo -u www-data php occ maintenance:data-fingerprint

bash

Step 6: Test on the new server

  1. Restart the database, web server or application server, and the Nextcloud application.
  2. Check if maintenance mode is still active, if any log files have been generated, and if there are any error messages.
  3. Turn off maintenance mode and log in as administrator to verify that everything is working properly.

Step 7: Update DNS Record

Update the CNAME record in DNS settings to direct users to the new location.

Note

Aside from enabling maintenance mode, no changes should be made to the old instance. In the event of a problem, you can revert to the old instance. Depending on the size of the instance, the Nextcloud migration may take several hours.

Managed Nextcloud

Cloud storage that puts you in control

  • Effectively protect your data with industry-leading security
  • Save time on updates and maintenance
  • Easily add apps and collaboration tools

Migrate from ownCloud to Nextcloud

Migrating from ownCloud to Nextcloud can be compared to a manual upgrade. It is essential that the versions of both Cloud applications are compatiblewhich limits compatibility to migration from ownCloud 10.13.x to at least Nextcloud 25.0.13. To migrate ownCloud to Nextcloud, follow these steps:

  1. Create a backup : To be safe, make sure to create a backup before starting the migration process.
  2. Download the compatible version of Nextcloud : you will find the downloadable version of the software from the Nextcloud archive page.
  3. Perform the upgrade : follow the instructions in the official Nextcloud upgrade documentation to install Nextcloud on your existing ownCloud instance.
  4. Adapt the database : After updating, run the following commands (after running occ upgrade) to correctly configure the database:
occ db:convert-filecache-bigint
occ db:add-missing-columns
occ db:add-missing-indices
occ db:add-missing-primary-keys

bash

  1. Control cron jobs : if cron jobs (cron jobs) were in place in the old configuration, make sure they are executed via the PHP command (and not occ system:cron), according to the instructions for Nextcloud cron jobs.
  2. Upgrade Nextcloud : Use Nextcloud's built-in updater to upgrade to the latest version of the app.
  3. Analyze warnings : Check the “Overview” section of settings to identify possible security or configuration alerts.
  4. Reactivate apps : After migrating to Nextcloud, some ownCloud applications may be disabled. You can install Nextcloud equivalents of these apps using the following commands:
occ app:enable calendar
occ app:enable contacts

bash

Backup Cloud by Acronis

Protect your devices and reduce downtime

  • Automatic backup and easy restore
  • Intuitive management and planning
  • AI-powered threat protection

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Web Marketing

Localhost: how to connect to 127.0.0.1?

When you call an IP address, you are usually trying to contact another computer on the Internet. However, if you call the IP address 127.0.0.1,

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact