How to recover deleted notes

Thanks @laurent!

For anyone else who wants to do this, the steps are:

  1. Make a backup of your Joplin data: ~/.config/joplin-desktop.

  2. In a terminal,
    sqlite3 ~/.config/joplin-desktop/database.sqlite

  3. In sqlite3,
    select item_id, body_diff from revisions order by created_time;

  4. Look at the results to find what you want to restore. Copy the item_id.

  5. Download Joplin 2.0.8 from Release v2.0.8 · laurent22/joplin · GitHub (I first tried 2.0.4 and it didn't work).

  6. Open Joplin 2.0.8. This upgrades your Joplin database so the old version can't use it anymore. That's why you need a backup.

  7. Ctrl+Shift+P (or Command+Shift+P), then "restoreNoteRevision NOTE_ID".

  8. Save your restored note somewhere outside Joplin.

  9. Replace ~/.config/joplin-desktop with your backup.

  10. Open the old Joplin and import your saved note.

Once version 2 is released, you can skip 5-6 and 8-10.

4 Likes