I have a Nextcloud Snappy installation (from channel=17/stable) running on Ubuntu 18.04.03 LTS on a Lenovo Ideapad L340. A nightly cron job executes the ânextcloud.exportâ CLI utility. All has been working fine.
Last night the cron job aborted in the middle of exporting the database. The following morning the filesystem on the L340 had become read-only and I had to run fsck to repair it - lots of repairs (around 50) were done. After that the L340 boots up fine into Ubuntu and the Nextcloud server comes up and seems still to be working fine today. However now anytime when I try to export the database (e.g. by running nextcloud.export, or nextcloud.mysqldump) I get this message:
mysqldump: Couldnât execute âSHOW VARIABLES LIKE âgtid_modeââ: Table âperformance_schema.session_variablesâ doesnât exist (1146)
I.e. it appears that Iâve lost at least the âperformance_schema.session_variablesâ table out of my database. Conceivably there is other damage to it as well.
I ran ânextcloud.occ maintenance:repairâ and it ran ok, but I still have the same error about my missing database table.
Is there a way I can repair or rebuild my mysql database? Thanks.