Lost all notes after logging into Joplin Cloud - bug or I did something wrong?

Operating system

Windows

Joplin version

3.2.11

Sync target

Joplin Cloud

Editor

Markdown Editor

What issue do you have?

Hello,
I got into Joplin after hearing about the accessibility improvements in the latest version, and I love the experience. I regularly use Mac, Windows and iOS so having an app that lets me have access to my notes while keeping them secure in an accessible and intuitive UI is great. However, during my testing something happened that shook my confidence somewhat and I'm now trying to understand why.

At first, I set up sync between my Mac and PC through the filesystem on a network share, and this worked great, with the minor snag that I had 2 copies of the Welcome notebook which I hadn't yet deleted. So I did that and used the app on both systems like this for a few days with no problems.

Later, I was working on a project with another person, who was also interested in trying out Joplin, so we both figured it would be a good time to try the cloud collaboration feature. I signed up for a Joplin cloud trial, then in the sync settings on my Mac I simply changed the target from filesystem to Joplin Cloud, signed in and we carried on our way.

The problem started the next day, when I wanted to add my Windows PC to the cloud because it was still set up to sync through the filesystem. With my prior experience of the welcome notebook being duplicated I first cleared out everything, then as before I went into the sync settings, changed the target from filesystem and Joplin Cloud and signed in.

To my surprise, this resulted in nearly all notes being erased from both devices, including the one shared note disappearing for the other person. Looking at the logs it seems the local state of the windows app of nothing being there except one thing in the trash took priority and all notes on the remote end were deleted. Locally I didn't lose too much work over it and I had a copy of the shared note in the trash which was kept, but this situation concerned me somewhat.

I attached a log snippet from the windows side when the first sync happened where it seems it deleted most notes from remote because they didn't exist locally, which of course then triggered the deletions on Mac which I verified by looking at the logs there.
Curiosly, when I added my iPhone to the same account today nothing like this happened, it just downloaded all notes that were in the cloud while also syncing a few local notes. In case this matter the phone wasn't set up to sync with anything unlike the computers.

My question is what happened here? Did I perhaps find a bug because I changed the sync target on an existing profile and this somehow caused the deletions, or is this intended behavior? This makes me wonder what should someone do in the future if they get a new computer or have to reinstall and want to set up sync properly. Would it behave the same way, so you'd first have to manually import from a backup before configuring sync, or I ran into a bug?

Log file

Sync_log.txt (20.7 KB)

If you delete all your notes, the app recorded that you did that and will apply the deletion to all sync targets, so it's working as expected. If you hadn't deleted everything, the notes would have stayed on the sync target too.

To avoid any confusion it's best to create a new profile when switching sync target.

Hey, sorry this happened to you!

I'll try to explain what happened

Basically since local deletion (of the same data that was already in the Joplin Cloud) by user was the latest action, Windows uploaded deletion action to Joplin Cloud

The safe way to clear Joplin client on Windows and download the Joplin Cloud data would be by using button "Delete local data and re-download from sync target" on Syncronization page in Options

I get that duplication of "Welcome" notebook have put the assumption of potential note duplication but in your case, there was really no need to clean Windows client. If you'd changed Windows client synctarget to Joplin Cloud (which was previously synced with the same data present), Windows client would simply acknowledge it and be okay with it. There would be neither upload nor download of data -- only confirmation that the same notes are already in place.

Now suppose you want to add another client -- say android phone. If you just installed Joplin on it and never synced it to any other cloud or filesystem, then you can simply authorize it with Joplin Cloud -- even without using the button "Delete local data and re-download from sync target" (and without deleting local data manually). Android app will upload local notes and download the ones on the cloud.

I understand this experience probably shook you but not to worry, there's not only Trash feature to prevent deletions -- desktop Joplin has even backup plugin built-in which saves all your notes locally. So, there wasn't much danger even if stuff, indeed, would go south (somehow).

Thank you for describing your experience in detail and giving Joplin a spin!

Cheers

Thanks both of you for the much needed context! :slight_smile: Now I know how to handle this in the future in case I want to add a new device and I feel much better about the sync process in general.

1 Like