Oops....I deleted files

Running Joplin on Ubuntu 20.10 on a workstation. I'm working remotely, away from my usual Synology drive sync source. So I was just storing daily notes locally, without syncing. Then I attached a USB drive to my router, so that I could sync. Figured out the proper path, using File System option, and attempted to sync to a new empty folder. I gather this was a mistake. Joplin displayed a message saying it could not sync, as Fail Safe was checked, and said turn off Fail Safe. So I did. I gather this was the second mistake. When I hit sync, it started deleting my local files. I shut it down, but lost some files.

So now I'm looking for the Joplin local storage on a Linux system. Once found, I will try to use Testdisk to restore the deleted files.

Any suggestions would be appreciated. Thx in advance.

1 Like

I'm using Joplin 1.6.7, by the way.

Joplin data is stored in .config/joplin-desktop all notes are stored in database.sqlite. It's possible that the database will have revisions of some of the notes that got deleted but you'll have to open the database to find out.

For anyone curious this is the message that would have been displayed

'Fail-safe: Sync was interrupted because 100% of the data (X items) is about to be deleted. To override this behaviour disable the fail-safe in the sync settings.


Thank you, CalebJohn. I'm running a scan with R-Linux right now, I'll see what I find. Thanks to you, at least I know where to look now. :+1:

Best of luck, i hope you can recover your notes. This post reminded me to take a backup of my notes, hopefully it's a good reminder for others as well.

OK, I have located the file and used R-Linux to recover the entire joplin-desktop folder, including database.sqlite, to a USB stick. But there seems to be an issue with permissions when I try to open the file with DB Browser for SQLite. I get this: "Could not open database file. Reason: attempt to write a readonly database" I've checked the permissions, Read/Write/Execute are all checked. I'm afraid my database-foo is sadly lacking.....

That's strange, if you're opening the database it shouldn't be attempting a write. I just opened my database (using DB Browser for SQLite on Ubuntu 20.04) using this button with no issue.

In any case, if you have recovered the folder as it was pre-sync-mishap there won't be any need to open the database itself. Just backup your current joplin-desktop folder and replace it with the recovered one. It should work fine.

Well, gave that a try, but it did not work. Apparently R-Linux just recovered the newest version of database.sqlite, which still had files deleted. Looks like I need something that can recover deleted entries within a database file. Back to the drawing board....

Also installed Undark-0.6 and gave that a shot. It's supposed to recover deleted database entries. From a 10.8MB file, it recovered about 200k before encountering an error and stopping. None of the recovered entries were the missing ones.

I could purchase one of the commercial recovery apps, but I'm only going to lose about 3 weeks worth of daily notes - the rest are backed up at home on my NAS. The notes are nice to have but not critical to my process.

I've used Joplin for quite some time now, and it works so well that I got careless. My own fault the entries were deleted. It's a lesson for me to pay attention and do my homework before just randomly doing things.

and create bakups!
For an automatic backup you can use the backup plugin.


Excellent idea. I gave it a shot on my Linux platform. After restart of Joplin, this is what I saw:

Please updatet your Joplin installation to a newer one, ther was a bug with in your version.

1 Like

OK, updated from 1.6.7 to 1.7.11 (I forget the Linux version doesn't auto-update) with wget. Error messages gone. But it won't let me select a file path using the browse button - it locks up when I select a folder, and only way out is Cancel. I can copy/paste a path in tho, which is fine. I must not have the format correct, as the backup says "Backup path does not exist". I'm using "/home/user/media/user/Data/Joplin Backup Files" and it doesn't appear to like that.

Where did you select the file path? Because the path is a textbox and no file/path selector.

The error message is Backup Path '/home/user/media/user/Data/Joplin Backup Files' does not exist ?
Can use change into this folder with a cli and output the path with pwd

There is a Browse button beside the file path. I can browse to the folder and select it, then select Open. After that, the dialog seems to hang and the only thing I can do is select Cancel to get out of it. And then no path has been put in the path box.

No, it is not that detailed - it's exactly what I typed in my previous post. pwd gives me /media/user/Data/Joplin Backup Files. This gets rejected also. I changed the folder to Joplin_Backup_Files, thinking the spaces might be an issue, but that did not work either.

At any rate, you've written a nice and very useful plugin, and I don't mean to complain about it, although it may seem I am. If this helps you get it working on Linux, great. If the problem is with me, let me know, I'll go read your full docs. :grin:

Can you please post a screenshot from both, because the plugin is working on linux.

OK, here's where I use the Browse button to try to select the backup path. I've selected the folder, but at this point the only active thing is the Cancel button.

So I click Cancel, copy/paste the path, click Apply then Back then Tools/Create Backup and I get this:


ok, you didn't set a path. Please change to the backup section.
I think you have selected the field for Text editor command!

Hmmm.....obviously a certified "Doh!" moment on my part. It worked perfectly, when silly user errors were eliminated. Thank you!

Now that I have an auto-backup (which I should have done previously), I'll work on syncing what I have to my new sync point.

1 Like

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