Lost all notes due to conflict

I had the sync option enabled to local disk.Then yesterday out of nowhere all notes (>11K) where gone except a tab labeled as ‘Conflicts’ with a few notes (1.5K).
I don’t know why there was a conflict as I just host the files localy and don’t sync with a second device.
The sync directory has all the md files in there.
Importing the data back as md directory brings nonsense back.
Doing manual sync pointing to the same directory (I even cloned it and started cleanly) brings nothing back.
Is there a way to recover to the original state?

You need to clear your profile (delete ~/.config/joplin-desktop), then set Joplin again and sync it with that directory.

I would recommend against syncing if you don’t need sync though. If you need a backup, you can use one of the export formats.

Thanks for replying.
I’ve just finished doing that but unfortunately it reverted back to the 1.5K notes not the full 11K,probably because the damage had already be done.