Migrate from Owncloud to Nextcloud – Linux

I don’t think I will say much about Nextcloud in this post so lets jump to the migration right away!

It is a fairly simple and quick process to migrate from Owncloud to Nextcloud.
I think you can approximately do it 2-3 minutes. basically you will have to do the following

  • Remove everything from you owncloud folder except data and config.
  • Download nextcloud and copy everything to you old owncloud folder.
  • Go to your web browser or run sudo -u www-data php occ upgrade

First you want to make a copy/backup of your Owncloud folder.

Then remove everything inside your owncloud folder.

The reason we made a backup of the Owncloud folder was to make sure we still
have the config and data, so cp that in to the owncloud folder again

Step 1. install Nextcloud

We are going to download nextcloud, make sure you get the lates release

Extract the tar ball and moove it to Apache’s web root.

The time has to upgrade to Nextcloud.

And then set the right permissions for nextcloud as the last thing we will have to do(like we did in the “How to setup nextcloud”)
save the content below and make sure the filename ends with .sh and edit line 2,3,4,5 so it fit’s your system. give it permission to be executed with sudo chmod +x filename.sh
and to run the file type ./filename.sh in the terminal.

And that should be it! open up your browser and enter your IP/FQDN to confirm it works!

  • Hannes

    Many thanks, it worked great!

  • Hermann Kaiser

    Thanks. It work nearly perfect.
    had to copy the hidden files afterwards.
    .htaccess
    .user.ini
    NextCloud was giving me and integrity-failure on the admin page!

    • Thanks!
      I completely forgot about the hidden files..

  • gusdisqus

    Good instructions thanks!
    I would also recommend to update the cron task location to poin to nexcloud. Like:

    # crontab -u www-data -e
    */15 * * * * php -f /var/www/nextcloud/cron.php > /dev/null 2>&1

    • Correct me if I’m wrong here. but you have created a /nextcloud folder right?
      In this guide it is not necessary to update the cron job because all of the files from nextcloud/ is copied to owncloud/
      I was too lazy when i did the migration myself to change the web root dir as well :D
      but thanks! i think I will update the guide in the near future