I can’t edit text files via the nextcloud web ui using the “Text” or “Notes” apps.
I can create them (“New text file”), and if I select one of the templates, the file is written to disk with the template data.
If I then edit the file via the web ui, the changes are not saved to disk and are lost when rebooting the container. They do show up in the file if I open it on the web ui, but are lost at next reboot (or maybe sooner, haven’t done longterm tests)
I can upload files via the web ui (and the desktop and mobile clients)
Ah, didn’t spot that. No, I don’t do auto upgrades. Although I haven’t specified a version in the docker-compose.yml, does that mean it automatically pulls the newest one?
only if you do a docker compose pull and docker compose up -d though if you’re using any docker UI it might be doing it without you knowing. Either way, updating a database while it’s being accessed will cause corruption.
take a look at your /config/databases/17325de1474e.err file and see if anything jumps out. You could try restoring a backup from the last time it worked too
Thanks. I tried to restore backups, but it seems they are all broken as well. I assume my method of backing up (I rsync the volumes while they are running) is… suboptimal.
Can I try to fix the database somehow?
you could try a repair, just google mariadb repair, but this is a bit out of scope for us as it’s not a container issue.
A few things to keep in mind,
don’t update mariadb while things are accessing it (stop containers that access it before doing ANY maintenance on the db, to include restarting, stopping, updating, and repairing)
take proper backups of your database following the link above
Yeah, my bad. I spent half a day trying to fix an unfixable database, got fed up with that and set up the nextcloud server from scratch in like 30 mins
I have now set up proper backup: stop nextcloud, dump the sql, rename the sql to include date and move it to a properly backed-up location.