'PDOException' updating from 13.0.1 to 13.0.4

Nextcloud version: 13.0.1
Operating system and version: Ubuntu 14:04 (note, I can’t fix this, I’m on Dreamhost)
PHP version: 7.0.27

The issue you are facing:

When I try to use the browser updater, it hangs on creating a backup, so I generally have to do a command line update:

wget https://download.nextcloud.com/server/releases/nextcloud-13.0.4.zip
unzip nextcloud-13.0.4.zip 
mv owncloud owncloud_bak
mv nextcloud owncloud
cp owncloud_bak/config/config.php owncloud/config/
mkdir owncloud/data
cp -r owncloud_bak/data/* owncloud/data/
diff -q owncloud_bak/apps owncloud/apps | grep "Only in "
cp -r owncloud_bak/apps/calendar owncloud/apps/
cp -r owncloud_bak/apps/tasks owncloud/apps/
cp -r owncloud_bak/apps/contacts owncloud/apps/
cp -r owncloud_bak/apps/deck owncloud/apps/
cp -r owncloud_bak/apps/notes owncloud/apps/
cp -r owncloud_bak/apps/caniupdate owncloud/apps/
cd owncloud
php occ upgrade

Usually it is seamless. This time I encountered a bunch of errors. The full screen output is at: https://paste.debian.net/1029818/ but they all start with something close to:

An unhandled exception has been thrown:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig' in /home/user/example.com/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104
Stack trace:

Note: my Nextcloud instance lives at example.com/owncloud because I didn’t want to break my Sync URLs when I migrated from Owncloud a year or two ago.

https://paste.debian.net/1029818/

Does your database have a table named oc_appconfig?

it does, yes:

sqlite> .open data/owncloud.db 
sqlite> .tables
oc_accounts                  oc_file_locks              
oc_activity                  oc_filecache               
oc_activity_mq               oc_files_trash             
oc_addressbookchanges        oc_flow_checks             
oc_addressbooks              oc_flow_operations         
oc_admin_sections            oc_group_admin             
oc_admin_settings            oc_group_user              
oc_appconfig                 oc_groups                  
oc_authtoken                 oc_jobs                
...

(And yes, I’m running Nextcloud. But the db name didn’t change when I migrated from Owncloud, which I did a long time ago.)

I haven’t used sqlite so far, so I don’t know the tools you need to check the database. Make sure you put on the maintenance mode to avoid multiple access at the same time.

Maybe it is a permission issue: after copying all the neccesary files - are they owned by the webserver user as they should?
You might need to do a chown -R www-data:www-data owncloud (assuming your webserver-user is www-data after copying all files and run the occ command as the webserver user.

Hi Guys,

i got the same error while trying to update from 13.01 to 14 via Updater. After putting instance into maintenace, occ is broken with the same error.

Database: MongoDB, Table oc_appconfig exits also with content.

So i can’t move for or backwards right now :frowning:

Any Ideas?

Is this supported now?

MongoDB = MYSql

So i guess yes.

No ideas? I can not get back from maintenance anyway :confused:

It was an really bad FAIL of me. I had run the wrong occ in the wrong diretory. I did install NX at another path than now… So i delete all the old files now :confused:

This is actually not true. Those two are quite different database systems.
[EDIT: after reading this again, I think instead of MongoDB you may have meant MariaDB, which is very similar to MySQL and supported by Nextcloud]

Anyway - good to hear that you found the problem :slight_smile:

Yes man :smiley: I always mix maria and mongo. For sure, mongo is a tootally different system. Of course, I use MariaDB :slight_smile: