Migrating from ownCloud to Nextcloud

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 9.0.6.5 at the moment.

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

Any success story?
Thanks!

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

Yesterday I migrated succesfully from 9.1.2.5 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 9.1.2.5 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.
Thanks.

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:

Prepare:

  • 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

Backup:

  • 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)

Hi.

I see multiple OC 9.1.x to NC 11.x success stories in this thread

@jospoortvliet What is the ā€œofficialā€ state on how to migrate from OC 9.1.3.? Should I migrate

  • directly to NC 11.0.1
  • first to NC 10.0.2 and then to NC 11.0.1

?

Seemingly ā€œsuccessfulā€ might not be the right wayā€¦ right? :slight_smile: In example, NC10 does some DB optimisation on upgrade from OC/NC9. NC11 asserts that there has been NC10 before and does not do that, that is - skipping NC 10.x could mean skipping some under the hood stuff that is not visible now, but might bite in the future.

Thanks!

See https://nextcloud.com/migrate for some info on what goes to what. If it doesnā€™t cover your question please let me know! I will then update the website so I answer it for everybody :wink:

Although my migration went very well, I must admit there is one thing weird when going into my cloud through the web interface: Iā€™ve got hundreds of connections which makes it take almost 10 entire seconds before I can eventually see something displayed on the web page.

In the screenshot, Iā€™ve used the network debugger in Firefox and as you can see in the top right corner, I have a total of 261 connections when I load the default index page (I donā€™t have a lot of items at the root: 5 folders and 1 file). Iā€™ve got around 200 connections before I can see something and then the rest is once the ā€œframeworkā€ is displayed:

It seems like a pretty huge number of css and js filesā€¦
Whatā€™s your advice @jospoortvliet?

I guess thatā€™s the wrong url, I get a 404. This links works https://nextcloud.com/migration/ :stuck_out_tongue:

sae here, seems to be absolutely normal. 95% is also loaded from cache after visiting the site once.

Yeah but even from cache, it takes a lot of time. Enough for the web app to be considered laggy/buggy Iā€™d say.