Migrating from ownCloud to Nextcloud

I migrated today from ownCloud 9.1.1 to Nextcloud 10.0.1 using the manual upgrade via terminal without any issue. :white_check_mark:
Many thanks for your great work!


An even better script can be found here: https://github.com/enoch85/ownCloud-VM/blob/master/static/move-to-nextcloud.sh

Be careful with this script, it is for very specific systems and might need some modifications:

  • You can only install Nextcloud with this script, when a direct upgrade to the current NC version is possible (currently OC 9.0 or newer)
  • Only for debian systems or derivates (webserver-user www-data)
  • why do you backup all databases that’s perhaps something you don’t want to
  • some parts about the vhosts are very specific to vm-image (idea: you want perhaps a redirect from example.org/owncloud to example.org/nextcloud)
  • it installs php7??? It’s unrelated to Nextcloud migration.

So it is probably a good solution for your previous owncloud-vm’s to migrate them to Nextcloud. But for all others it needs some modifications.

1 Like

You are right, it doesn’t cover all scenarios and yes, it is very specific for our (Tech and Me) previous ownCloud users.

Thanks for the clarification.

If you on the other hand want personal help with migrating (connecting to your server and do it for you) we have a product in our shop: https://shop.techandme.se/index.php/product/migrate-from-owncloud-to-nextcloud/


i have a OC 8.2.5 (stable) installation…which is the best way to migrate to NC?

First upgrading OC?

Migrate to NC 9 or equal to 10?

Can anybody help


best regards

you can migrate to Nextcloud 9 and then 10 directly.

See https://nextcloud.com/migration

1 Like

i tried the upgrade from ubuntu packages of OC 9.06 to NC 10.0.1. it seems i’ve lost all contacts an calendars. during the upgrade i encountered this error:

Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred while executing 'PRAGMA journal_mode = WAL':                                                                            

SQLSTATE[HY000]: General error: 10 disk I/O error
Update failed

according to this this thread i re-ran the upgrade procedure until it finished – that is three times. i was given a different error during the second run:

workflowengine: An exception occurred while executing 'CREATE TABLE "oc_flow_checks" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "class" VARCHAR(256) NOT NULL, "operator" VARCHAR(16) NOT NULL, "value" CLOB DEFAULT NULL, "hash" VARCHAR(32) NOT NULL)':

SQLSTATE[HY000]: General error: 1 table "oc_flow_checks" already exists

now, all i can see in the web frontend is “{{ dt | datepickerFilter:…” for calendars and “{{ctrl.t.addContact}}” for contacts.

can this be fixed, e.g. from the owncloud backup?

i can replicate the issue by repeating the migration process with the data from my backup. although i didn’t get any error messages the second time, the result is still messed up calendars and contacts.

[update]: i went all the way back to a backup of OC 8.1. upgrading to OC 8.2 went fine, but neither upgrading to OC 9.0 nor NC 9.0 would work. they both keep contacts intact (at least) but remove all calendar events. any ideas how to resolve this are most welcome.

should i open a new thread for the issue? am i the only one running into this?

If you can repeat it, you should definitely file an issue so the devs can find and fix the problem that causes it!
https://github.com/nextcloud/server/issues/new is probably the best way, though https://github.com/nextcloud/calendar/issues/new might be the place you’ll end up being pointed to depending on what causes the problem.

Thanks, as this actually helps - we can’t fix issues unless we have someone who can reproduce it and get us logs that pinpoint to the cause.

This migration procedure just does not work at all. It leads to Errors 500 from apache:

  1. Downloaded nextcloud 9.0.55, unpacked it to /var/www/html/nextcloud
  2. copied owncloud/config/config.php over to nextcloud/config/config.php
  3. renamed owncloud to owncloud.old
  4. renamed nextcloud to owncloud
  5. restarted apache
  6. tried to reach https://myserver.domain.sample/owncloud
  7. got error 500.

after trying some of the tips given, and wasn’t able to get around Error 500 I gave up two hours later. Any idea on some new, working scheme to migrate from one to the other? I’m at owncloud at the moment.

What about migrating 9.1.X (9.1.3) to Nextcloud 11.

Any success story?

I can’t really say, if this is officially supported, but there was some success with the release candidate:

Yesterday I migrated succesfully from to Nextcloud 11 without any issues. But I used a very plain instance without many plugins…

Hay, thanks!

I think i’ll test with a backup, then if everything goes well i’ll replay here.

Yesterday I did the migration from OC to NC 11. All seems to be working well. I don’t have any extra pluggins though, so that might help a bit.

Is the upgrade path still the same for moving from Owncloud 9.1 to Nextcloud 11?

I can confirm that moving to Nextcloud was a piece of cake: https://www.techandme.se/we-migrated-to-nextcloud-10-0-1/

If you want custom support you can check this out: https://shop.techandme.se/index.php/product/migrate-from-owncloud-to-nextcloud/

I was able to complete the upgrade from ownCloud 9.1.3 to Nextcloud 11.0.0.
Making note that i was using only the minimum plugins enables.

  • Images/Gallery
  • Activity
  • Move files
  • Calendar

Everything seems working right.

I can confirm, the migration from owncloud 9.1.2 to nextcloud 11.0 was a cinch. I copied the Installation files (zip) to my webspace and copied the old “data” folder and config.php into the new installation folder. Followed by occ command (sudo -u www-data php /var/www/html/YOURFOLDER/occ upgrade).
Take a look at: Nextcloud manual upgrade
!!! Don´t forget to backup before migrating !!!

Yet another successful migration from ownCloud 9.1.3 to Nextcloud 11.0.0 (on Debian 8.0/Nginx).
I only have 4 third-party apps: calendar, contacts, mail, tasks.

Here are my steps for the migration:


  • Go to ownCloud dir:
    cd /var/www/owncloud
  • Activate maintenance mode:
    sudo -u www-data php occ maintenance:mode --on
  • Disable third-party apps:
    sudo -u www-data php occ app:disable calendar
    sudo -u www-data php occ app:disable contacts
    sudo -u www-data php occ app:disable mail
    sudo -u www-data php occ app:disable tasks


  • Create backup dir:
    mkdir -p ~/owncloud_final_backup/{app,cron,data,db}/
  • Backup your cron job(s):
    sudo -u www-data crontab -l > ~/owncloud_final_backup/cron/crontab
  • Backup app list:
    sudo -u www-data php occ app:list > ~/owncloud_final_backup/app_list.txt
  • Backup app:
    sudo rsync -Chav . ~/owncloud_final_backup/app > ~/owncloud_final_backup/rsync_app.log
  • If your data is in a different directory, backup the data as well:
    sudo rsync -Chav /path/to/owncloud/data/ ~/owncloud_final_backup/data > ~/owncloud_final_backup/rsync_data.log
  • Backup DB:
    mysqldump -u owncloud -p owncloud > ~/owncloud_final_backup/db/owncloud.sql

Install Nextcloud:

Download Nextcloud, verify SHA256, decompress.
See: https://docs.nextcloud.com/server/11/admin_manual/maintenance/manual_upgrade.html

  • Move:
    sudo mv ~/nextcloud/ /var/www/
  • Go to Nextcloud directory:
    cd /var/www/nextcloud
  • Copy config file:
    cp /var/www/owncloud/config/config.php config/
  • Set access rights:
    sudo chown -R www-data:www-data .
    sudo find . -type d -exec chmod 750 {} \;
    sudo find . -type f -exec chmod 640 {} \;
  • Upgrade:
    sudo -u www-data php occ upgrade
  • Remove obsolete third-apps:
    sudo rm -rf apps/{contacts,mail}

Change your web server

Since everything is almost still functional for ownCloud (except the DB that has been updated), I decided to create a new Nginx server config to test if everything was going right with Nextcloud. You’ll have to find that yourself depending on if your on nginx or apache.

Here’s what I did:

  • Copy the owncloud config file to a new nextcloud file
  • Change the nextcloud server config (new server “beta.yourcloud.com”, verify paths ,etc.)

Run Nextcloud for the first time

  • Change the config.php (server name)
  • Enable third-party apps:
    sudo -u www-data php /var/www/nextcloud/occ app:enable calendar
    sudo -u www-data php /var/www/nextcloud/occ app:enable tasks
  • Enable contacts and mail third-party apps
  • Exit maintenance mode:
    sudo -u www-data php /var/www/owncloud/occ maintenance:mode --off
  • Verify everything works!!

Get ready for production

  • Change the server config (your production server name)
  • Change the config.php (your production server name)

That should be OK. But continue to verify everything (your cron’d backups, etc)