Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud errors migrating from 57a to 60.1 #2196

Closed
infidelus opened this issue Nov 5, 2022 · 3 comments
Closed

Nextcloud errors migrating from 57a to 60.1 #2196

infidelus opened this issue Nov 5, 2022 · 3 comments

Comments

@infidelus
Copy link

infidelus commented Nov 5, 2022

I decided to have a go at upgrading to the latest release today.

I run my mailinabox in a VM, so after creating a final MIAB backup, i shut the machine down, renamed it and created a new Ubuntu 22.04 VM, then followed the maintenance instructions for moving the install.

I've had to re-do this about four times today as there were a couple of minor issues I had to resolve and I wanted a clean, error free install; the biggest issue being the fact that the ssl folder gets populated with pem files that duplicity can't overwrite when you run the restore.

On reading the MIAB forum, I deleted everything in the ssl folder and the restore then completed successfully, however, when running 'sudo mailinabox', as soon as it gets to the nextcloud section the script errors out:

Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2022-11-05-22:38:57...

Upgrading to Nextcloud version 21.0.7

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 11 database disk image is malformed in /usr/local/lib/owncloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /usr/local/lib/owncloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /usr/local/lib/owncloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /usr/local/lib/owncloud/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()
#3 /usr/local/lib/owncloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /usr/local/lib/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /usr/local/lib/owncloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /usr/local/lib/owncloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /usr/local/lib/owncloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /usr/local/lib/owncloud/lib/private/legacy/OC_App.php(975): OC\AppConfig->getValues()
#9 /usr/local/lib/owncloud/lib/private/Server.php(682): OC_App::getAppVersions()
#10 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#11 /usr/local/lib/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /usr/local/lib/owncloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#14 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#15 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(177): OC\AppFramework\Utility\SimpleContainer->get()
#16 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /usr/local/lib/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /usr/local/lib/owncloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#20 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#21 /usr/local/lib/owncloud/lib/private/Server.php(1041): OC\AppFramework\Utility\SimpleContainer->get()
#22 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#23 /usr/local/lib/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#25 /usr/local/lib/owncloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#26 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#27 /usr/local/lib/owncloud/lib/private/Server.php(2000): OC\AppFramework\Utility\SimpleContainer->get()
#28 /usr/local/lib/owncloud/lib/private/Files/View.php(119): OC\Server->getLockingProvider()
#29 /usr/local/lib/owncloud/lib/private/Server.php(430): OC\Files\View->__construct()
#30 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#31 /usr/local/lib/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#33 /usr/local/lib/owncloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#34 /usr/local/lib/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#35 /usr/local/lib/owncloud/lib/private/Server.php(1363): OC\AppFramework\Utility\SimpleContainer->get()
#36 /usr/local/lib/owncloud/lib/base.php(588): OC\Server->boot()
#37 /usr/local/lib/owncloud/lib/base.php(1076): OC::init()
#38 /usr/local/lib/owncloud/console.php(49): require_once('...')
#39 /usr/local/lib/owncloud/occ(11): require_once('...')

I've run this twice now (created a new VM when I got this error the first time), once with 'sudo mailinabox' and the second time with the standard 'curl -s https://mailinabox.email/setup.sh | sudo -E bash' script, and both times the above errors occur I end up back at the terminal prompt.

I'm curious why it's trying to upgrade to 21.07 when the initial configuration installs 23.04, though I'm assuming that the backup has something that's forcing a staged Nextcloud upgrade.

@infidelus infidelus changed the title Nextcloud errors migrating to 60.1 Nextcloud errors migrating from 57a to 60.1 Nov 6, 2022
@danyeaw
Copy link

danyeaw commented Nov 7, 2022

I ran in to this as well. Running rm -r /home/user-data/owncloud and then running ./mailinabox again got around the error for me.

@infidelus
Copy link
Author

Thanks. I might have another go at the weekend if I get the time.

@infidelus
Copy link
Author

I've managed to do the upgrade now by removing the owncloud folder, though I think running the command just prior to doing the reconfigure was the wrong time and I should have run it straight after installing MIAB on the new machine as I lost all of my email contacts and calendar events. Just a guess on my part as I don't fancy going through the whole thing again, and it was 'almost' as easy to just boot up the old install again and export what I wanted.

I did see a couple of warning messages about doveconf that I posted on the main forum post but it doesn't seem to have affected anything though, other than a couple of test emails I sent myself after doing the upgrade, I've not had any new emails since upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants