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.
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.
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.
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.
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.