[Solved] Resync after hdd replace on server

Hello everybody. I have little trouble with my cloud. I have replaced HDD on my server so the data directory of nextcloud is clear, but mariadb base was on another disk and nextcloud think that my files are on place. But they are not! My desktop client doesn’t sync anything. How can I force client to resync everything?

There is no such function. You have to trick the client/server. Make a backup of all your data in case something goes wrong. Put your server in maintenance mode, then use FTP or SFTP to put your files manually on the server. Preserve the date/time of the files (like you restore the files from your backup). What you see in the root-folder of your user can be found in:
/path/to/data-folder/user/files/

There are other ways to clean out the server and upload everything again through the client, but then you will lose all sharing settings.

Thank’s, i’ll try it!

There is a way, please do the following:

  1. open nexloud/config/config.php
    fix the path to your data 'datadirectory' => '/path/to/data-folder',
  2. go to root of your nextcloud and do the following command: sudo -u www-data php occ files:scan --all

it will rescan all files you can also check for other commands by just doing sudo -u www-data php occ

Actually scratch that out, I misread the question.