Migration from 8.1(sqlite) to 10.9.1(mysql)

I have a very old instalation of OC in Debian 8 server. It was testing machine and I tried it in ver 8.1 with sqlite. It was installed from this repo:

Now we have 2022 year and I make a new virtual server for OC (debian 11, OC 10.9.1 with mysql).
I tried to import owncloud/db(sqlite) to new mysql server adn failed
I tried convert sqlite db to mysql format and failed.
I tried to migrate my acc with syncing (maintance on, rsync data, maintance off) data dir but I cant see a new files from older acc. Is there any way to migrate my old OC server to new one for this situation? Im common server`s admin, not specialist for sqls.

Hello fleg,

For older versions of owncloud, there were a tool implemented in owncloud to convert sqlite to mysql using a occ command.

Unfortunately you provided very less information about the case itself, you just stated that it failed.
It would be very helpful to describe the conditions of your attempt, so we have at least a hint what is going wrong.

One useful hint: Sometimes, an upgrade seems to fail because it is mixed with a relocation of the data directory. There should be a section in the manual about that, the old path isn’t just present in the config file, it is also present in the database entries, but that can be corrected quite easily when you know, what to look for: Manually Move a Data Directory :: ownCloud Documentation (for the actual version)

An easier approach may be installing a (maybe older) version of mysql (or mariadb) aside the older owncloud installation to do the database migration based on the tool and the older version of owncloud (preferably without changing the file location, see above) first and then start the upgrade path (see documentation) afterwards.

Thanks for the hint, now I`m trying to import converted mysql db to new machine.

New info.
I coverted sqlite db to mysql format from older machine and copy to new one.
Then I importet old sql to sql server (owncloud db).
Note:I have a fresh install od OC with ownclouddb db in new server.
Then I edited permisions for ocadmin user in Mariadb and granted all privileges to owncloud db…
I rewrite apps, config (except config file) and data dirs with data from old server.
I edited config new OC server config file and change db from owncloudb to owncloud.
Then I tried to run maintance mode and I failed.

root@owncloud:/var/www/owncloud# sudo -u www-data php occ maintenance:mode
{“reqId”:“4fOEU1R24ts0tgejCRWR”,“level”:3,“time”:“2022-01-19T18:04:26+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“Undefined index: version at /var/www/owncloud/lib/private/legacy/app.php#865”}
{“reqId”:“4fOEU1R24ts0tgejCRWR”,“level”:3,“time”:“2022-01-19T18:04:26+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“Undefined index: version at /var/www/owncloud/lib/private/legacy/app.php#869”}
{“reqId”:“4fOEU1R24ts0tgejCRWR”,“level”:3,“time”:“2022-01-19T18:04:26+00:00”,“remoteAddr”:"",“user”:"–",“app”:“index”,“method”:"–",“url”:"–",“message”:“Exception: {“Exception”:“UnexpectedValueException”,“Message”:“Invalid version string \”\”",“Code”:0,“Trace”:"#0 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(1149): Composer\\Semver\\VersionParser->normalize()\n#1 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(869): OC_App::atLeastMinorVersionLevelChanged()\n#2 \/var\/www\/owncloud\/lib\/private\/legacy\/util.php(1538): OC_App::shouldUpgrade()\n#3 \/var\/www\/owncloud\/lib\/public\/Util.php(735): OC_Util::needUpgrade()\n#4 \/var\/www\/owncloud\/lib\/base.php(348): OCP\\Util::needUpgrade()\n#5 \/var\/www\/owncloud\/lib\/base.php(660): OC::checkUpgrade()\n#6 \/var\/www\/owncloud\/lib\/base.php(1070): OC::init()\n#7 \/var\/www\/owncloud\/console.php(74): require_once(’\/var\/www\/ownclo…’)\n#8 \/var\/www\/owncloud\/occ(11): require_once(’\/var\/www\/ownclo…’)\n#9 {main}",“File”:"\/var\/www\/owncloud\/lib\/composer\/composer\/semver\/src\\

I am in dead end now.
Edit: After analyzed logs I try these steps
I tried edit version in config an rewrite it from to
Webserver show me I have older version in logine page and offer me upgrade but it failed.

More info. This is mesage in version in config.

sudo -u www-data php occ maintenance:mode
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode is currently disabled

and this is the same in in config.

sudo -u www-data php occ maintenance:mode
An unhandled exception has been thrown:
UnexpectedValueException: Invalid version string “” in /var/www/owncloud/lib/composer/composer/semver/src/VersionParser.php:186
Stack trace:
#0 /var/www/owncloud/lib/private/legacy/app.php(1149): Composer\Semver\VersionParser->normalize()
#1 /var/www/owncloud/lib/private/legacy/app.php(869): OC_App::atLeastMinorVersionLevelChanged()
#2 /var/www/owncloud/lib/private/legacy/util.php(1538): OC_App::shouldUpgrade()
#3 /var/www/owncloud/lib/public/Util.php(735): OC_Util::needUpgrade()
#4 /var/www/owncloud/lib/base.php(348): OCP\Util::needUpgrade()
#5 /var/www/owncloud/lib/base.php(660): OC::checkUpgrade()
#6 /var/www/owncloud/lib/base.php(1070): OC::init()
#7 /var/www/owncloud/console.php(74): require_once(’/var/www/ownclo…’)
#8 /var/www/owncloud/occ(11): require_once(’/var/www/ownclo…’)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.