Recovering annotations from webdav directory


I had to recover some notes from a webdav directory for some problems, like no synchronization between computer and smartphone and because I thought that markdown file from webdav directory could be imported directly in joplin but this leads to some unreadable files that looks likes files that are for joplin internal use.

I get 3 type of file involving the same ID. One is the normal note, the 2 others iare like these:

(almost) normal note contains this:

História da Física Infeld #historiadafisica

Alexandre Medeiros (link quebrado lá dentro)

ver artigo/entrevista com Infeld

[Log In or Sign Up to View](  [Entrevista com Leopold Infeld: Uma História Saída das Sombras](  [Entrevista com Leopold Infeld: uma história saída das sombras | Medeiros | Caderno Brasileiro de Ensino de Física](

id: 468b9c93559041a5ba2fde4b8fffcf00
parent_id: 2d8b99b3fa064a08b5627fee3225b5b1
created_time: 2021-01-08T01:48:04.000Z
updated_time: 2021-01-10T17:36:18.686Z
is_conflict: 0
latitude: 0.00000000
longitude: 0.00000000
altitude: 0.0000
is_todo: 0
todo_due: 0
todo_completed: 0
source_application: net.cozic.joplin-desktop
order: -62167208012000
user_created_time: 2021-01-08T01:48:04.000Z
user_updated_time: 2021-01-10T17:36:18.686Z
encryption_applied: 0
markup_language: 1
is_shared: 0
type_: 1

Another note with the same id contains this:

id: 154f9231ae4a4a3f896cec47451e64a5
note_id: 468b9c93559041a5ba2fde4b8fffcf00
tag_id: 0d831f728d7345dc94c217685eb03d66
created_time: 2021-01-07T22:01:58.062Z
updated_time: 2021-01-07T22:01:58.062Z
user_created_time: 2021-01-07T22:01:58.062Z
user_updated_time: 2021-01-07T22:01:58.062Z
encryption_applied: 0
is_shared: 0
type_: 6

The third note that deals with the same id contain this:

id: 68785e0b3999427791f86621dfea8443
item_type: 1
item_id: 468b9c93559041a5ba2fde4b8fffcf00
item_updated_time: 1610300178686
title_diff: "@@ -0,0 +1,43 @@\\n+Hist%C3%B3ria da F%C3%ADsica Infeld #historiadafisica\\n"
body_diff: "@@ -0,0 +1,763 @@\\n+%0AAlexandre Medeiros%0A (link quebrado l%C3%A1 dentro)%0A%0Aver artigo/entrevista com Infeld%0A In or Sign Up to View%5D(  %5BEntrevista com Leopold Infeld: Uma Hist%C3%B3ria Sa%C3%ADda das Sombras%5D(  %5BEntrevista com Leopold Infeld: uma hist%C3%B3ria sa%C3%ADda das sombras %7C Medeiros %7C Caderno Brasileiro de Ensino de F%C3%ADsica%5D(\\n"
metadata_diff: {"new":{"id":"468b9c93559041a5ba2fde4b8fffcf00","parent_id":"2d8b99b3fa064a08b5627fee3225b5b1","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"","source_application":"net.cozic.joplin-desktop","application_data":"","order":-62167208012000,"markup_language":1,"is_shared":0},"deleted":[]}
encryption_applied: 0
updated_time: 2021-01-10T17:39:35.351Z
created_time: 2021-01-10T17:39:35.351Z
type_: 13

I use joplin-desktop 1.7.11 in archlinux. I don't think jopling log is relevant here because it is not an error of joplin.
I'm wondering if I could automatize some cleaning of thoose "repeated" notes.

I was planning to use duometer, GitHub - pmandera/duometer: Near-duplicate detection tool, in order to remove duplicated annotation but I could not install it in archlinux and due to the structure of the related notes found, duometer would be mostly useless.

The second is a tag and the third is note history data.

If you do not know what they are, please do not mess with them. When using note history, a note is built by the initial note and all note history data. What do you think will happen, if you delete a history data file from the middle of the stream? A -> B -> C -> D -> E -> F (A the initial note, and B to F the diffs). If you delete C, the note is corrupted.

P.S.: Data on sync targets is not for users. They could be binary files. People trying to edit and do the weirdest stuff with these files never ends well.

Ok. One possible way to recover thoose files correctly could be to set the sync target from an fresh joplin installation?

In truth, the real problem behind my post is that I don't know how to recover all notes from my android app, as I couldn't make cloud sync work and there is no option for exporting data in android app, but I as far as I know.

You can export your profile from the config screen, then use it in the desktop app to recover your notes.

OK. THis gave me the file joplin.spqlite but I don't see how to import this kind of file in joplin-desktop.

Just copy it to your Joplin profile dir on your PC, replacing the file that was there (make a backup obviously). I think you also need to rename it to database.sqlite.

Most likely, your PC profile will be in in your user home dir under .config/joplin-desktop.

Ok. Thank you. It is not very simple, especially when you run joplin with synchronization but it can solve my problem. I will probably create a new user dedicated to joplin so that I don't need to suppress my current configurations and annotations on my desktop and notebook in order to recover annotations from my android app.

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