I would be very careful to restore databases, especially when you say that there are bugs. If possible, I would export calender and contacts from apps that were synced. Or if you restore from the old database, do it in a special recovery session, export the data and import them into the new setup.
Without the filecache, you can use the old data, re-index all data but this will lead to a complete resync on all clients.
Exactly this is what I want to prevent: Restoring old shit.
So I tried to reduce it to a minimum: I restored:
oc_accounts
oc_credentials
oc_groups
oc_group_admin
oc_group_user
oc_users.sql ← erst am Schluss!!!
I tried a short login with one user with old passwort: Works!
While thiis short phase also data directories of 2 users were created: Seems, that synchronization works too.
Perhaps a bad database situation for these users now … I don’t know.
Now I copied all the old data folders of all users … and now will create a snapshot to be able to revert to this situation.
Sets the data-fingerprint of the current data served
This is a property used by the clients to find out if a backup has been restored on the server. Once a backup is restored run ./occ maintenance:data-fingerprint To set this to a new value.
Updating/Deleting this value can make connected clients stall until the user has resolved conflicts.
Actually I just had a corrupted oc_filecache without any possibility to even dump it. So needed to do occ files:scan --all and scan-app-data to rebuild it. I was happy to see, that the clients did NOT resync all the files. They just checked all of them without actually transfering one.
As the oc_filecache can be large and for sure be a holder of errors/corruption I would give it a try to rebuild it. In case of course backup/dump of the whole database should be done in every case.
Backup and resync of calendar, tasks and contacts via clients on phone and/or desktop is good hint. Did it the same way and worked fast and great. Just take care that these clients support the full caldav/carddav fields. E.g. Thunderbird+SoGo just allows 2 phone numbers and 2 mail addresses, so I needed to do contact backup with Android app, which provides the sometimes 4 to 5 fields I have for some contacts.
# sudo -u www-data ./occ files
Nextcloud is in maintenance mode - no app have been loaded
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "files" is not defined.