Recover Deleted Notes using History feature

Every accidentally delete a note, or many notes?

Make sure History is enabled in General Options first. This is required. Mine is set for 90 days.

You will need this tool, SQLite studio for your platform:

I tested the Windows Portable version and it worked!

In Joplin, if you accidentally delete a note, it doesn't go into a recycling bin, but there is a way to retrieve it. You can use the restoreNoteRevision command to recover deleted notes, provided you have the note history feature enabled and are within the configured keep period. Here's a step-by-step guide to help you:

  1. Open your Joplin profile directory: Go to Help > Open Profile Directory in Joplin.

  2. Locate the database.sqlite file: Make a copy of this file as a backup.

  3. Use a SQLite database browser: Open the copied database.sqlite file with a tool like SQLiteStudio. Highly recommended!!

  4. Find your deleted note: In the revisions table, sort by either updated_time or created_time to find your most recent changes. You can sort in Asc or Dec order. There is also a great search box that will find all notes with the word "lion" for example.
    "title_diff" and body_diff" will contain the actual note data.

  5. Identify the note: Look for the item_id of the deleted note in the revisions table.

  6. Restore the note: In Joplin, open the Command Palette (Ctrl + Shift + P on Windows/Linux or Cmd + Shift + P on macOS) and type restoreNoteRevision followed by a space and the item_id you found.

  7. Check the 'Restored Notes' notebook: Your note should now be in a new notebook named 'Restored Notes'.

Just for the information of those that may not be that confident with delving into a SQLite database:

  • From version 3.x Joplin does have a "Trash" folder. Joplin 3.x is currently available as a pre-release and is due to be made a full release in the first week of July 2024.

  • For those that use the Backup plugin included with Joplin there is also a method to restore a single note from a backup detailed on the Plugin's GitHub page.



This will definitely be the preferred method.

Don't thank me I am just the messenger :slight_smile:

From what I can gather when @laurent asked earlier this year, "What do you want for 2024?", a trash / recycle bin was quite a popular response.