Database integration after new installation of nc

A update from nextcloud crashed. After several attempts to get it running I saw only the way to reinstall (a new version) of nextcloud on the server. But before I made a backup of the folder “data” and “config”. And the data in the database MariaDB are still present.
But after the reinstallation of nextcloud it is still not running. For that reason I created a new config.php file with the username, password etc. of the database.
After that netxtcloud worked. I can create new users., but I cannot see the “old” user, especially their address books and the calendars.
What should I do to integrate the database in order to see the user with the address books and the calendars?
Can anyone help me?