I used to sync my Joplin desktop app (Mac) to DropBox. There's an Apps folder on the top level of DropBox, and inside that is a folder labeled Joplin.
After erasing my internal HD and reinstalling Joplin, I can't get the application to recognize that I have a backup folder already on DropBox. It insists on making a new one and syncing that folder instead.
I would just drag the Joplin folder on DropBox to my Mac to restore the notes, but I have no idea where it's supposed to go. The sync folder has about 3000 .md files along with a "locks" folder and a "temp" folder. Neither the folder at ~/.config/joplin-desktop nor the one at ~/Library/Application Support/Joplin has anything resembling this setup.
How is one supposed to get formerly synced notes back into the Joplin application?
As I erased my HD, I no longer have a local backup.
But I did branch off of your idea and tried replacing everything in the new Joplin folder ("Joplin (1)") with all the files from the old Joplin folder ("Joplin"), deleting the old folder, renaming the new folder "Joplin," and force sync'ing from the cloud to local storage. This correctly rebuilt all the data on my HD (well, almost; there were a bunch of images in the notes that won't synchronize, for some unknown reason).