Upgrade to docker container

Hi team,

I am testing to upgrade nextcloud on CentOS 7.9 from version 16 to dockerized Nextcloud version 24(latest).

What I have done till now:

  1. Upgraded nextcloud version 16 to nextcloud version 24 (using docker containers)
  2. Backup the database from local mysql and restored the database to mariadb container.

Now after that when I open the URL in GUI it asks me to perform the upgrade via GUI. While doing that I am getting this error:

" Update to 24.0.2

Exception: Database error when running migration 16000Date20190212081545 for app core The table with name ‘nextcloud.oc_login_flow_v2’ already exists.

Detailed logs

Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

Repair info: All tables already have the correct collation → nothing to do

Repair step: Repair SQLite autoincrement

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Exception: Database error when running migration 16000Date20190212081545 for app core The table with name ‘nextcloud.oc_login_flow_v2’ already exists.

The update was unsuccessful. Please report this issue to the Nextcloud community."

============================================================

Can anyone suggest what could be the issue?

CHeers!
Amrit

Did you upgrade directly from 16 to 24? Skipping major versions is not supported.

Hi @KarlF12 , I am not upgrading directly, I have upgraded the nextcloud container version by version like 16–>17–>18–>19…–>24.

Any particular reason for 24.0.2 instead of 24.0.7?

Can you post your Docker and Nextcloud configs?

Hi Karl,

No specific reason to go for 24.0.2 instead of 24.0.7.

Please find the Nextcloud config file below:

======================================================================

<?php $CONFIG = array ( 'trusted_domains' => array ( 0 => 'test.domain-name.com', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'mysql', 'version' => '24.0.2.1', 'overwrite.cli.url' => 'https://test.domain-name.com/nextcloud', 'dbname' => 'nextcloud', 'dbhost' => 'db', 'dbport' => '3306', 'dbtableprefix' => 'oc_', 'dbuser' => 'nextcloud', 'dbpassword' => 'DA@digital1!', 'installed' => true, 'session_lifetime' => 900, 'session_keepalive' => false, 'mail_from_address' => 'leontest-nc', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_domain' => 'domain-name.com', 'mail_smtphost' => 'x.x.x.x', 'mail_smtpport' => '25', 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', 'skeletondirectory' => '', 'maintenance' => false, 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'instanceid' => 'oczu55ia8tgg', 'loglevel' => 2, 'encryption.legacy_format_support' => true, 'encryption.key_storage_migrated' => false, 'theme' => '', ); ========================================================================== And by docker config file, did you mean .yml file?

Nextcloud config file:

Hey @KarlF12 I was wondering if you get a chance to look at the configuration file? Thank you.

I don’t think there’s anything wrong with your Nextcloud config file, but I was wondering what led to you upgrading to 24.0.2 instead of 24.0.7. Normally you would go to the latest patch (now 24.0.8 I think).

Did you have any errors at all before this one? I don’t know much about the database tables, so I may not be the one to fix your issue.