Upgrading from 5.0.13 to 6.0.0 fails
I've tried to upgrade from 5.0.13 to 6.0.0. I've installed the 6.0.0 in an empty folder, then copied data and config folders from the 5.0.13 backup and I'm getting these errors, then reloading tells that "oc_jobs" table does not exist.
Unknown database type varchar requested, Doctrine\DBAL\Platforms\SqlitePlatform may not support it.
That's the first message I'm getting
and
An exception occurred while executing 'SELECT "id" FROM "oc_jobs" WHERE "class" = ? AND "argument" = ?': SQLSTATE[HY000]: General error: 1 no such table: oc_jobs
this message is the one I'm getting if I refresh the page. So I don't really understand what's going on.
Can you test again with 6.0.0a? http://download.owncloud.org/community/owncloud-6.0.0a.tar.bz2 Thanks a lot.
that's giving me the same errors
I can confirm the problem. I get exact the same error messages, with 6.0.0 and 6.0.0a as well. If I then add the missing table via the sqlite3 command line[1], I get the lucene error message. I did not try to create the "preupdate.php"[2] with 6.0.0a, just with 6.0.0 where this did not change anything.
[1] https://github.com/owncloud/core/issues/6294#issuecomment-30398575 [2] https://github.com/owncloud/core/issues/6313#issuecomment-30343223
Strange. I thought that this was fixed. @icewind1991 Can you have a look please?
Can confirm that this error is still not fixed. Also getting the same error with 6.0.0a here.
@GuillaumeBibaut @sjjh @danielhass In order to get this sorted out - can I ask you to specify your environment as explained in https://github.com/owncloud/core/blob/master/CONTRIBUTING.md
Please also let us know how you installed and upgraded your installations.
I really think we are really hunting a very special beast and wild guessing will not help at all.
THX
Server configuration
Operating system: FreeBSD 9.2-RELEASE amd64
Web server: Apache 2.2.26
Database: SQLite
PHP version: Php 5.4.23
ownCloud version: (see ownCloud admin page) 5.0.13
Updated from an older ownCloud or fresh install: Fresh install
List of activated app: default ones
The content of config/config.php: (Without the database password and passwordsalt)
$CONFIG = array (
'instanceid' => '5283ae55a9f8b',
'passwordsalt' => 'passwordsalt',
'datadirectory' => '/usr/local/www/owncloud/data',
'dbtype' => 'sqlite3',
'version' => '5.0.25',
'installed' => true,
'forcessl' => true,
);
Are you using external storage, if yes which one: None
Client configuration
Browser: Safari Version 7.0.1 (9537.73.11)
Operating system: Mac OS X 10.9.1
Here is how I proceeded to try to upgrade as root
cd /usr/local/www
cp -rp owncloud .owncloud.bck
rm -rf owncloud
pkg install -f owncloud
# 'pkg info -o owncloud' tells : owncloud-6.0.0a
cp -rpf .owncloud.bck/data owncloud/
cp -rpf .owncloud.bck/config owncloud/
cat << EOF >> owncloud/.htaccess
AuthType Basic
AuthName "ownCloud"
AuthUserFile /usr/local/www/owncloud.passwd
AuthGroupFile /dev/null
Require user adminown user1 user2
<Files status.php>
Order allow,deny
Satisfy Any
Allow from all
</Files>
EOF
service apache22 restart
Errors are the ones already written on top of this issue threads
First installation was proceeded like this
pkg install owncloud
cd /usr/local/www
cat << EOF >> owncloud/.htaccess
AuthType Basic
AuthName "ownCloud"
AuthUserFile /usr/local/www/owncloud.passwd
AuthGroupFile /dev/null
Require user adminown user1 user2
<Files status.php>
Order allow,deny
Satisfy Any
Allow from all
</Files>
EOF
service apache22 restart
And then I followed the typical install of owncloud-5.0.13 with SQLite backend.
Actual behaviour
After copying the owncloud.db in the /data/ folder and reload the page the error mentioned above appears
Steps to reproduce
- Install owncloud from the openSUSE package (http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_12.04/)
- copy the old database (owncloud.db) from the old manual installation to the new /data/ folder
- reload owncloud page
Server configuration
Operating system: ubuntu 12.04.3 LTS
Web server: Apache 2.2.22 (Ubuntu)
Database: SQLite 3.7.9
PHP version: 5.3.10-1ubuntu3.9
ownCloud version: 6.0.0a
Updated from an older ownCloud or fresh install: fresh install with copied database
List of activated app: default
The content of config/config.php:
'ocfc2d9769d3', 'passwordsalt' => '....', 'datadirectory' => '/var/www/owncloud/data', 'dbtype' => 'sqlite3', 'version' => '6.0.0.14', 'installed' => true, 'theme' => 'phaenovum', 'maintenance' => false, ); Are you using external storage, if yes which one: no ### Client configuration Browser: Firefox 26.0 Operating system: Arch Linux Kernel 3.12.5 #### ownCloud log (data/owncloud.log) {"app":"index","message":"Exception: An exception occurred while executing 'SELECT \"id\" FROM \"oc_jobs\" WHERE \"class\" = ? AND \"argument\" = ?':\n\nSQLSTATE[HY000]: General error: 1 no such table: oc_jobs","level":4,"time":"2013-12-19T18:31:15+00:00"} {"app":"index","message":"Exception: An exception occurred while executing 'SELECT \"id\" FROM \"oc_jobs\" WHERE \"class\" = ? AND \"argument\" = ?':\n\nSQLSTATE[HY000]: General error: 1 no such table: oc_jobs","level":4,"time":"2013-12-19T18:31:16+00:00"} Hopefully this is all you need.
hm. Might it be that it tries to read the cron jobs list before the DB upgrade is complete?
Is it fixed now? Is anyone working in this? Do we have to wait for the next release?
I just changed the dbtype from 'sqlite3' to 'sqlite' and it worked. Not a fix but a workaround.
@danielhass did you also copy config.php to the new folder ? Copying the db alone might not be enough. The upgrade system is using the version numbers present in config.php to figure out how to upgrade the DB schema.
@PVince81 thanks! exactly this was the problem, but it was hard work for me to recognize that I was doing something wrong. I copied the config.php and the database. After that I had forgotten to fix the read/write permissions of the config.php. So the update script started but I got the message that the update had failed, cause of the permissions. But for all that the updater changed the version number to 6... Not recognizing this change in the config.php I fixed permissions and started owncloud again with the error mentioned above which was due to the wrong version number in the config like you said. @karlitschek @icewind1991 May it be possible not to touch the config.php if the update fails? Would that be a good idea?
There have been discussions already about finding a way to revert broken upgrades. It is still recommended to do a backup of the config, data and database before trying an upgrade.
Ok! yes the backup I made saved my day ;)
Did you have more luck upgrading to 6.0.1 ?
The upgrade to 6.0.0 worked for me as I mentioned above. From 6.0.0 to 6.0.1 there was no problem at all.
Thanks for the update @danielhass
How about you @GuillaumeBibaut ?
Hi,
I had the same problem. As I was using ubuntu packages the upgrade was automatic by aptitude so I don't have backups. Is there anything that I can do?
@bingen please start as described here. Thanks! https://github.com/owncloud/core/issues/6416#issuecomment-30955710