An Entire Notebook was Deleted

Operating system

Linux

Joplin version

2.12.19

Desktop version info

Joplin 2.12.19 (prod, linux)

Client ID: d1a2c4397afe401b9e3f357503e3f67b
Sync Version: 3
Profile Version: 43
Keychain Supported: No

Favorites: 1.3.0
Simple Backup: 1.3.4

Sync target

Nextcloud

Editor

Rich Text Editor

What issue do you have?

Unfortunately, a whole notebook of mine has disappeared.

Immediately before this happened, I deleted a single .md file on the sync target, as the Desktop client was complaining about not being able to get its content. The file was indeed empty, I had deleted the content of the file on the sync target a couple minutes before to try and alleviate another error with the same file (a bunch of attributes like creation date, modified date were missing). So I thought deleting a single file wouldn't do too much harm...

A couple seconds after that, the Desktop client synced and started deleting all my notes in the notebook. The mobile client did the same thing (arguably I should have disabled network access on my phone and tried to backup, but I naively hoped that one of the clients would realize that there was no reason to delete the notes).

Before deleting the above mentioned .md file, I created new notebooks and sub-notebooks and assigned my notes to them. I had four notebooks before the deletion, now I only have three.

Before doing that I also installed the Simple Backup plugin and configured it. Of course it didn't make a backup yet, because I left it to its default backup interval of 24 hours.

Log

Looking at the log, I went from a total notes count of 98 to 38. The lines of the log between these two counts is riddled with lines like this:


2023-12-07 13:47:29: Synchronizer: "Sync: deleteRemote: local has been deleted: (Remote ffb01bc130a84b0095e6caf940d2f202)"

And (I think after a program restart) this:


2023-12-07 13:48:49: Synchronizer: "Sync: fetchingProcessed: Processing fetched item"
2023-12-07 13:48:49: Synchronizer: "Sync: deleteLocal: remote has been deleted: Note: (Local 1f2ec2093f874dc9a7642a987353fd19): (Remote 1f2ec2093f874dc9a7642a987353fd19.md)"

How to recover?

To my untrained eye it looks like the changes I made (with regards to putting all my notes into new notebooks) were never actually fully pushed to the sync target and that somehow, the client decided that the newer local notes must be inferior to the old ones on the sync target. At the same time, the fact that the notes were structured differently in comparison to the target (i.e. all in one notebook on the target instead of neatly organized locally) did seem to get picked up, which then justified the deletion of the notes. The big question is, then, why the other three notebooks were left intact.

Would it make any sense to try and restore the .md files from Nextcloud's deleted files interface? For some reason it wont let me sort them properly, so even though I checked to list the freshest deleted files at the top, there are a couple older files sprinkled in (which I would try not to include). Makes me fear I'd only make it worse that way.

What may have happened is that the md file you deleted was the notebook metadata - and since it was deleted, the notebook content got deleted too.

If you still have things in the Nextcloud recycle bin you might want to ask for support over there as they can advise you better. If you can restore the sync target to its previous state, make a backup of it. Then you should reset your data locally (by deleting the profile folder), and sync again.

1 Like

Thanks for the reply! I was about to make copies of my Joplin profile before trying to restore the .md files, when I noticed that the Simple Backup Plugin did indeed make a copy (just not where it was supposed to, i.e. the path I specified, but in the Joplin .config folder). So a big thanks to the dev of that plugin! This unpredictable behavior has indeed saved me many hours.

General comment: I think that Joplin's lack of a "trash" folder should be grounds to proactively ask users if they want Simple Backup installed when they start using Joplin.

General comment: I think that Joplin's lack of a "trash" folder should be grounds to proactively ask users if they want Simple Backup installed when they start using Joplin.

We're working on including Simple Backup in the app by default :slight_smile:

1 Like

Amazing! :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.