I can’t install the new Version of Nextcloud | Exception: Database error when running migration latest for app core Update failed
Hi Takto, and welcome to the forum.
That looks slightly different from the problem I had (see Upgrade from 22.2.3 to 23.0.0 fails (DB issue?))
Which database do you use: MySQL?
Sorry I don’t really have a knowledge about Databases.
But at the install I did:
sudo apt install mariadb-server -y | to install the Database-Server
sudo mysql -u root -p | to connect to the Database
grant all on . to root@localhost identified by ‘privacy’ with grant option;
CREATE DATABASE nextcloud;
CREATE USER ‘nextclouduser’@‘localhost’ IDENTIFIED BY ‘privacy’;
GRANT ALL ON nextcloud.* TO ‘nextclouduser’@‘localhost’ IDENTIFIED BY ‘privacy’ WITH GRANT OPTION;
flush privileges;
*privacy isn’t my password
I have now seen your Post as well. You said you aren’t in a hurry to update. How did you close the updater? I now can’t connect to my cloud because it always redirects to this page:
How did you close the updater?
I can’t remember, TBH (sorry).
When the update failed I restored from backup; I have nightlies that capture:
- the data directory (nextcloud data folder)
- the install directory (nextcloud “code” folder)
- the nextcloud database
(…)
As I said in my post, that’s the first time I’ve ever had a problem with the updater - it’s always been rock solid for me (kudos to the Nextcloud team ).
…But maybe that’s lulled me into a false sense of security(?); the number of failure modes with this kind of thing is pretty large, after all.
FWIW, my general update plan from now on will be:
- Wait at least a week after the initial release; check the forum for other peoples’ experiences
- Check my nightly backups
- Put Nextcloud into Maintenance Mode, and while it’s there:
- snapshot the relevant Logical Volumes
- dump out the database
- …then run the updater
So if I ever have a problem again, I can restore the database and revert (more or less) instantaneously in file system terms.
(I’ve been thinking about a more systematic testing process for the apps I use, too).
[…] mariadb-server
Thank you. I was curious because I use Postgres; maybe that accounts for the slightly different failure/error(?)
EDIT: The updater is now offering me 22.2.5 (I’m on 22.2.3). I’m keen to try 23.x - it sounds really good - …but I’m in no rush, as I say; I’ll upgrade to 22.2.5 this weekend, as a stopgap measure.
You seem like a pretty knowledgeable guy in therms of databases. If posted on this topic over on Reddit. https://www.reddit.com/r/NextCloud/comments/surhzo/updating_to_nextcloud_2302_failed/
They suggest that I should do innodb_read_only_compressed=OFF to my database. I’ve tried it in many different ways.
In the database itself:
SET GLOBAL innodb_read_only_compressed=OFF;
In some file in the directory:
sudo nano /etc/mysql/my.cnf
innodb_read_only_compressed=OFF
Either way my it doesn’t work. Do you know how I could implement this only compressed off thing? And should I even do it?
Hi Takto.
Interesting; I haven’t heard that…
But I use Postgres; innodb is for MySQL and Maria (…and possibly other DBs I don’t know anything about).
FWIW I attempted to update this morning. But that deserves a separate post, because it’s complicated (short version: manual upgrade to 22.2.5 worked “with issues”; subsequent upgrade to 23.0.2 worked better).