i've been wanting to setup synchronization on my joplins for a while,
I have 2 desktop computers and a grapheneOS.
I deleted joplins from my graphenOS and proceeded to delete the sync setup from my non-main desktop computer. What this meant was turning off sync on that computer before deleting all the notes. I figured, once the encryption is setup, I can re-setup the sync and re-download the notes.
So I setup the encrypted sync on my main computer. then I re-enabled the sync on my secondary computer.
secondary computer asks me for a password, I enter it.
Then I notice that notes were starting to disappear on my main computer. after a while, each time it did a sync, more and more disappeared until all were gone.
I had expected the secondary computer to do a re-download of the notes once i re-setup the sync but instead it just deleted all the notes instead.
Not sure if that was the intended behavior but heart stopped nonetheless.
However, and I gotta give props to whoever designed joplin like this, apparently yall setup the app so it does automatic backups without the user explicitly opting into it.
Found the backup and followed the instructions here and it restored damn near all my notes!
So, personal opinion? Instructions on here are not necessarily guaranteed to go smoothly. On the other hand, Joplin in my opinion had already taken the proper steps to ensure if an issue does happen, backups already exist without user knowing about them and can be used to restore.
Would you mind sharing which option you used to set up the sync? i.e. Joplin cloud, OneDrive, WebDAV etc.
Also, did you use the option to re-encrypt existing notes after you enabled encryption, or you just enabled it only?
And could you clarify what you did to 'delete' the sync setup / turn off sync?
Would you mind sharing which option you used to set up the sync? i.e. Joplin cloud, OneDrive, WebDAV etc.
I use a nextcloud instance I host myself.
Also, did you use the option to re-encrypt existing notes after you enabled encryption, or you just enabled it only?
do you mean on my main desktop?
And could you clarify what you did to 'delete' the sync setup / turn off sync?
Sure, first I set the Synchronization target
to none on my secondary machine.
Then I proceeded to delete al the notes on it. I was trying to achieve a fresh/bank state on it.
Yes
I don't see it on here so I don't think so?
It's the re-encryption section under advanced settings. It should not be necessary for enabling encryption, but just needed to check.
I think I have an idea of what the problem was. So when you delete notes on the Joplin client, it stores a record in the (client side) database that those items need to be deleted, the next time you sync. When you set sync to none, all you did was postpone the deletions to be synced. So when you re-enabled sync after enabling encryption on your other client, those deletions were synced.
Because you did not re-encrypt the notes, the notes on you main desktop were considered unchanged, and therefore the deletions are considered the latest changes to the notes when synced. Even if you re-encrypted the notes though, it's possible the deletions would have taken precedence anyway, but best case scenario all notes would be moved to the conflicts folder.
I'm glad you did not lose much thanks to the backup. But in terms of how you would enable encryption correctly on an existing profile, you did not need delete anything, you just needed to enable encryption and then sync both clients. But to make all the existing notes encrypted you would also need to use the re-encrypt notes option
Out of curiosity, how would one reset their local database so it acts like a new instance?
The safest way is to create a new profile in Joplin, and set up the sync again once you have the target in the right state. Then you can delete the original profile if you no longer want it. If you don't have any other profiles and just use the default one, you could delete the profile data directly, which is stored at %home%/.config/joplin-desktop for the desktop app (you can delete the whole folder). On mobile you just uninstall the app.
Also be aware, the mobile app for Joplin does not currently have automatic backups like the desktop app.
1 Like