Rebuild nextcloud without losing data

Nextcloud version _(eg, 29.0.4)
Operating system and version Unraid, Docker Containers by linuxserver

MariaDB in separate docker container.

Issue: I have been running into constant database corruption and errors. I’ve been fighting it constantly. I want to just rebuild this from scratch, but without losing things.

I used BernieO/calcardbackup: Bash script to backup calendars and addressbooks from a local ownCloud/Nextcloud installation - Codeberg.org to dump all user calendars and contacts. My underlying filesystem is not encrypted and is in the nextcloud file structure.

My question is: what is the best way to do this? Just start with a fresh install, create the same users; mapped to the same directories? Do an file scan all and then import the contacts and calendars? Other thoughts or considerations?