Even with older versions of Joplin, it may be possible to recover recently deleted items from the database.
This requires the sqlite3 command and a Joplin profile in ~/.config/joplin-desktop/.
From a terminal:
- Important: Create a backup of the Joplin profile directory
bash$ cp -r ~/.config/joplin-desktop/ ~/.config/joplin-desktop.backup/ - Open the Joplin profile directory.
bash$ cd ~/.config/joplin-desktop/ - Make a copy of the database:
bash$ cp ./database.sqlite ./db-copy.sqlite - If Joplin is running, fully quit Joplin.
- Run the SQLite3 recovery tool (see the relevant SQLite documentation):
bash$ sqlite3 db-copy.sqlite ".recover --ignore-freelist" > recovered.sql - Inspect
recovered.sql. Some of theINSERT INTOqueries may include text from the deleted items. - Either:
- Manually copy/paste the deleted items from
recovered.sqlinto a new location or, - Attempt to reconstruct the database:
Then start Joplin.bash$ sqlite3 recovered.sqlite <recovered.sql bash$ mv database.sqlite database.old.sqlite && mv recovered.sqlite database.sqlite
- Manually copy/paste the deleted items from