Hello everyone,
I currently have a major problem with synchronisation.
So far, it has occasionally happened that a large number of files have been deleted locally. The next time I synchronised, the same number of files were recreated locally. I have therefore not given it too much thought.
Unfortunately, this was not the case during the last synchronisation. Now about 4000 notes are missing. Fortunately, not all clients have the error. I have therefore forced an upload from a previously unaffected client. This allows me to determine the difference in missing notes.
The question is, what is the best way to restore them? Copy the missing files to the server and then synchronise the clients normally? Or do I have to force synchronisation from the server? Are other actions necessary, such as file modification date or any config? Unfortunately, I have only found something about avoiding conflicts during synchronisation, but not how the mechanism works.
There's no provided way to merge note collections with Joplin. The safest way I could think of would be create a jex backup on both the good client and the bad client. Then rename the jex files to zip and extract them both to separate folders. On Windows explorer, copy all the contents from one folder to the other and skip copying duplicate files. The remaining files selected are the missing notes, and if you put those in a separate folder, you should be able to import them as a raw backup into Joplin.
If you need to check for missing updates as well, then you need to use something like VS Code (with the Compare Folder plugin) to do a full folder compare between both folders after extracting the jex files, identify which notes have changed, then manually merge the changes into your notes or take the later version from the exports if they have all the changes already (or alternatively delete 1 by 1 each note which have overlapping changes, then import the new versions).
Thank you for your help. I will definitely try that.
Is there another solution that works on the server side? Because here I have a complete history of all notes (as *.md on SERVER side) I don't quite trust the status on the client. Therefore I would like to check this additionally.
If you want to get a clean slate from the server without risk of messing up the server, you can do the following:
-Download / export the entire folder containing all the md files (including subfolders) on Nextcloud
-On Windows, put the downloaded folder to a known location
-Create a new profile on Joplin desktop, delete the welcome notebook permanently and the associated attachments
-Set up file system sync and point it to the downloaded folder
-Sync changes until complete, then sync one more time to ensure all items are fetched
-Providing the sync was successful, this should reflect what was on the server, minus any note history / orphan resources cleaned, if there are expired items based on the value of the keep note history for setting
I think I misunderstood this in your original post.
If you believe all notes exist on the server due to reuploading all notes from the 'good client', you should be able to reset your bad client and do a full sync from scratch. To avoid losing anything if something goes wrong, you can create a new profile (in the manage profiles section of Joplin) on your bad client, set up the Nextcloud sync to your existing target and let it sync to completion. If you then have all your notes available as expected, you can delete the original profile with the incomplete data