Migrating files and app-data from backup of old broken install

If the database is accessible, you should be able to restore contacts, calendars and todos with calcardbackup.
Check out the section Does this also work with a broken ownCloud/Nextcloud instance? in the README of the repo at codeberg.