Dav:migrate-calendars and dav:migrate-addressbook not available in 9.1.x?

contacts
calendar
9.1.x
help

#1

Hi,

an user of my cloud told me, that he couldn't create an event in a shared calendar. When I logged in as normal user (the one, that created the calendar and shared it with a group), I noticed that my calendars were completely missing and only the "loader circle" was shown on the left. Connecting to WebDAV via command line with cadaver and changing into calendars/${USERNAME} showed the calendars I've created including the shared one:

root@serverX:/data/owncloud# cadaver 
dav:!> open https://www.mydomain.de/owncloud/remote.php/dav/
Authentication required for Cloud on server `www.mydomain.de':
Username: ${USERNAME}
Password: 
dav:/owncloud/remote.php/dav/> cd calendars/${USERNAME}
dav:/owncloud/remote.php/dav/calendars/${USERNAME}/> ls
Listing collection `/owncloud/remote.php/dav/calendars/${USERNAME}/': succeeded.
Coll:   business                               0  Jan  1  1970
Coll:   contact_birthdays                      0  Jan  1  1970
Coll:   default                                0  Jan  1  1970
Coll:   inbox                                  0  Jan  1  1970
Coll:   outbox                                 0  Jan  1  1970
Coll:   shared_cal                             0  Jan  1  1970
dav:/owncloud/remote.php/dav/calendars/${USERNAME}/>

Since I updated directly from 8.x to 9.1.x I suspect that something during the update went wrong and I wanted to migrate the calendars manually but the command was not found.
So how do I now update/migrate the calendars? Or will the "dav:migrate-" commands come back with the next release?

Thanks
Torsten

Steps to reproduce
1. cd ${OWNCLOUDDIR}
2. sudo -u ${WEBSERVERUSER} php occ dav:migrate-calendars ${USERNAME}
3.

Expected behaviour
Calendars and/or addressbooks should be migrated from 8.x to 9.x

Actual behaviour
Error message that the command "dav:migrate-calendars" is not defined

Server configuration
Operating system: Debian Jessie (8.5)
Web server: Apache 2.4.10-10+deb8u5
Database: SQLite3
PHP version: PHP 5.6.24+dfsg-0+deb8u1
ownCloud version (see ownCloud admin page): Owncloud 9.1.0-1.1
Updated from an older ownCloud or fresh install: updated
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"P9croeHtjKnRuCCIRvfm","remoteAddr":"192.168.13.1","app":"files","message":"Exception: {\"Exception\":\"BadMethodCallException\",\"Message\":\"Not in batch\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/lib\\/private\\/Files\\/Utils\\/Scanner.php(143): OC\\Files\\Cache\\Propagator->commitBatch()\n#1 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(87): OC\\Files\\Utils\\Scanner->backgroundScan('')\n#2 \\/data\\/owncloud\\/apps\\/files\\/lib\\/BackgroundJob\\/ScanFiles.php(111): OCA\\Files\\BackgroundJob\\ScanFiles->runScanner(Object(OC\\User\\User))\n#3 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/Job.php(52): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#4 \\/data\\/owncloud\\/lib\\/private\\/BackgroundJob\\/TimedJob.php(53): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#5 \\/data\\/owncloud\\/cron.php(144): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#6 {main}\",\"File\":\"\\/data\\/owncloud\\/lib\\/private\\/Files\\/Cache\\/Propagator.php\",\"Line\":145}","level":3,"time":"2016-08-19T09:59:23+00:00","method":"GET","url":"\/owncloud\/cron.php","user":"--"}
{"reqId":"FpLKoMJklIAaBk+0X37f","remoteAddr":"192.168.13.1","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\/1.1 405 Listing members of this collection is disabled\",\"Exception\":\"Sabre\\DAV\\Exception\\MethodNotAllowed\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Tree.php(195): Sabre\\DAVACL\\AbstractPrincipalCollection->getChildren()\n#1 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(857): Sabre\\DAV\\Tree->getChildren('calendars')\n#2 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(911): Sabre\\DAV\\Server->addPathNodesRecursively(Array, Object(Sabre\\DAV\\PropFind))\n#3 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath('calendars', Array, 1)\n#4 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \\/data\\/owncloud\\/3rdparty\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#6 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#7 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#8 \\/data\\/owncloud\\/apps\\/dav\\/lib\\/Server.php(169): Sabre\\DAV\\Server->exec()\n#9 \\/data\\/owncloud\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(29): OCA\\DAV\\Server->exec()\n#10 \\/data\\/owncloud\\/remote.php(164): require_once('\\/data\\/owncloud\\/...')\n#11 {main}\",\"File\":\"\\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAVACL\\/AbstractPrincipalCollection.php\",\"Line\":95,\"User\":\"yoda\"}","level":4,"time":"2016-08-19T10:01:20+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/dav\/calendars\/","user":"${USERNAME}"}
{"reqId":"vbJncsylWxonTQLf\/+DZ","remoteAddr":"192.168.13.1","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\/1.1 405 Listing members of this collection is disabled\",\"Exception\":\"Sabre\\DAV\\Exception\\MethodNotAllowed\",\"Code\":0,\"Trace\":\"#0 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Tree.php(195): Sabre\\DAVACL\\AbstractPrincipalCollection->getChildren()\n#1 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(857): Sabre\\DAV\\Tree->getChildren('calendars')\n#2 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(911): Sabre\\DAV\\Server->addPathNodesRecursively(Array, Object(Sabre\\DAV\\PropFind))\n#3 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(334): Sabre\\DAV\\Server->getPropertiesForPath('calendars', Array, 1)\n#4 [internal function]: Sabre\\DAV\\CorePlugin->httpPropFind(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \\/data\\/owncloud\\/3rdparty\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#6 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:PROPFIND', Array)\n#7 \\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#8 \\/data\\/owncloud\\/apps\\/dav\\/lib\\/Server.php(169): Sabre\\DAV\\Server->exec()\n#9 \\/data\\/owncloud\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(29): OCA\\DAV\\Server->exec()\n#10 \\/data\\/owncloud\\/remote.php(164): require_once('\\/data\\/owncloud\\/...')\n#11 {main}\",\"File\":\"\\/data\\/owncloud\\/3rdparty\\/sabre\\/dav\\/lib\\/DAVACL\\/AbstractPrincipalCollection.php\",\"Line\":95,\"User\":\"yoda\"}","level":4,"time":"2016-08-19T10:01:49+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/dav\/calendars\/","user":"${USERNAME}"}

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

none

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
https://www.mydomain.de/owncloud/settings/integrity/failed
No errors have been found.

#2

You can't upgrade from 8.2 to 9.1 and skip 9.0. The update process checks the version and show a warning if a major version is about to be skipped. So you upgraded from 8.2.x to 9.1.x and disabled the version checks?


#3

I did not disable anything but used the debian built-in update function via aptitude.
But that is not my point. My question is why the "dav:migrate-" commands are no longer available?


#4

The problem is that the old calendar and contact tables are deleted with the upgrade to OC 9.1:

Therefore I asked about OC 9.0, if it was installed at all, ... Now if you want to convert your old calendars and contact, you probably need a backup of version 9.0 or 8.2.


#5

I see. I was not aware of that.
Well the update to 9.1 has been made a month ago and I don't remember if I updated straight from 8.x or if I did an update to 9.0 first.
On the other hand I could simply delete the calendars and create them as new. There was not much info stored in them up to now.
I'll give that a try and see what happens.
By the way, do you know by chance if it is sufficient to drop my calendars called "business" and "shared_cal"? The other ones seem to be some standard calendars created by oC during the installation.


#6

Ok, there is something else going on there.
I asked a friend to login to his account and he sees the shared calendar and can even create an event.
But another friend has the same problem as me that he's not seeing any calendar.
And if we try to create an event we get the message "Please create a calendar first".


#7

Perhaps the friend with the working calendar opened it when you had OC 9.0 installed, and his calendar was migrated? But that's just a guess.

Then create a new calendar first (in the webinterface).


#8

Well, that could be. At the moment I don't use the oC calendar that much and the for other ones the same applies. But for that particular friend you could be absolutely right.
I tried to create a new calendar via the web interface but the message "Please create ..." still appears and I don't see any calendars in my web interface but when I connect via command line (cadaver) I see the new calendar.
Is there a way to migrate the calendars now with 9.1 installed or do I have to revert back to 9.0 (if thats possible)?


#9

Hi,

Is there a way to migrate the calendars now with 9.1 installed

oC 9.1 don't have the migrate command so you can't migrate the calendars.

or do I have to revert back to 9.0 (if thats possible)?

reverting back is only possible when reverting to your oC 9.0 backup. It is not possible to do a downgrade.