Converting Database Type Fails

Nextcloud version Nextcloud Hub 6 (27.1.3)
Operating system and version Ubuntu 22.04.4 LTS
Apache or nginx version Docker/ docker-compose / Nginx proxy
PHP version (eg, 7.4): PHP 8.2.12

My Admin Settings reads “SQLite is currently being used as the backend database. For larger installations… To migrate to another database use the command line tool: “occ db:convert-type”, or see the documentation :arrow_upper_right:.”

I’m able to start the conversion with the following command but am unsure how to debug one warning and one error.

docker-compose exec -u 33 app php occ db:convert-type --all-apps mysql nextcloud nextcloud

The warning reads that oc_carnet_metadata “will not be converted”, which does not appear on the Inconvertible Tables Documentation.

It seems to move onto oc_accounts reading 100% before it errors with a duplicate entry. How do I proceed with the conversion?

I keep on attempting to work this out on my own but I am truly stuck…

Is Carnet disabled by chance?

The Carnet app table may not be getting converted because it may not exist in the source database (if you’re curious, the reason Nextcloud knows about it the carnet table at all is because it looks up the db config in the app itself).

As for the errors during the oc_accounts conversion… those might suggest maybe the target database already has tables in it. Maybe from attempting to convert more than once while troubleshooting? Specifying --clear-schema should clear existing tables in the target database.

For what it’s worth, the latest documentation set has been slightly revised (more to come soon after some other related work hopefully) for db conversions:

While that’s technically documentation for the upcoming Server v29, that command hasn’t changed.

Thank you so much for your reply jtr. I’ve been improving my backup and chipping away at your suggestions.

Carnet was indeed disabled! I’ve re-enabled it for the time being so I don’t have to see the skip prompt. I followed Configuring a MySQL or MariaDB Database to make an empty database called ‘nextcloud_mariadb’ for my ‘nextcloud’ to be converted into but then realised this is not how the command works.

In any case, --clear-schema helps but now results in a different error for ‘oc_activity’, seems like date format is not being converted perhaps. I’ve enabled all my disabled apps and installed my pending app update, not that will help. How does one deal with invalid time format? I really appreciate your help