Nextcloud version: TrueCharts 28.02
Operating system and version (eg, Ubuntu 20.04): truenas Scale + macOS Ventura
After reinstalling NC on the server side (docker container) and re-linking the client, NC populated the local NC folder with the default NC files, deleting all existing folders without warning. Moreover, these local files and folders were not in the trash either.
At no time, under no circumstances, things like yours should happen! There must be a bug somewhere and it’d nice if you could open issue on GH with description of what happened.
In a true server replacement situation you’d presumably have matching data already on the server-side (i.e. restored from a backup)… Or you’d follow the approach described in the above link to override treating the server as authoritative.
In your scenario you’re doing neither. Either configure a second account in the client and treat the new server as a new server (which it sounds like it is)… Or follow the above documented approach.