My Joplin notes are synchronised through Nextcloud.
Infortunately, I've had to reinstall completely my server. This operation resulted in a loss of my data on the server : I had to restart on a blank new disk.
I still have all my notes on my Joplin PC version. But if I try to resync, as the Joplin server folder is empty, Joplin will delete all my notes on my PC.
How can I sync from PC to server and get all my notes back to Nextcloud ?
The way I managed this in the past was to export all the notes from Joplin on the PC as a JEX export. File > Export All > JEX - Joplin Export File.
Then delete all the notes and notebooks from Joplin on the PC. (You could also close Joplin and delete or rename <user_home>/.config/joplin-desktop but this is will reset Joplin back to "factory settings" without any sync settings, custom css, plugins, templates etc.)
Then connect Joplin to the Nextcloud sync target (if it isn't already)
Joplin treats the imported notes / notebooks / tags / resources as new items and syncs them to Nextcloud.
NOTE: Do not delete the JEX file immediately after importing it. Keep it safe until the sync is complete and you are happy that everything is back where it should be.