I have run into the same problem - but due to my own mistake.
I had (copiously) annotated three articles using the new PDF reader and then, quite foolishly, chose to "rename attachments" using Zotfile, to convert them into linked attachments (earlier they were stored files).
And now I notice that the annotations are gone. Probably because the storage folder in which the PDF were originally present were removed when Zotfile executed the "move" operation.
But since the annotations themselves are stored in the DB, would like to know if there is anyway to retrieve them?
I remember a few words that I had used in the annotations, but I had not tagged them.
Is it possible to take a "text dump" of all annotations?
I will be happy even if I just get the "comments" back - without the highlights to which they were linked.
It's not really about the file location — it's just that ZotFile deletes the old stored-file attachment and creates a new linked-file one, and in the process it deletes the annotations stored with the old attachment.
It's likely possible to get the annotations back from one of the automatic backups in your Zotero data directory, though doing it through Zotero is a bit complicated, because you can't view the annotations without the files, and the files no longer exist in the same location. Possible, but it would be a bit tricky to do.
If you're OK with just the comments, one option might be to use an SQLite database browser to open the zotero.sqlite.bak file (or zotero.sqlite.1.bak, depending on the timestamp) and extract the 'comment' field from the itemAnnotations table to a CSV file.
Just to update this old thread from the Zotero 6 beta period, before Zotero 6 was released ZotFile was updated to not delete Zotero-created annotations when moving attachments, so this no longer occurs.
I had (copiously) annotated three articles using the new PDF reader and then, quite foolishly, chose to "rename attachments" using Zotfile, to convert them into linked attachments (earlier they were stored files).
And now I notice that the annotations are gone. Probably because the storage folder in which the PDF were originally present were removed when Zotfile executed the "move" operation.
But since the annotations themselves are stored in the DB, would like to know if there is anyway to retrieve them?
I remember a few words that I had used in the annotations, but I had not tagged them.
Is it possible to take a "text dump" of all annotations?
I will be happy even if I just get the "comments" back - without the highlights to which they were linked.
It's likely possible to get the annotations back from one of the automatic backups in your Zotero data directory, though doing it through Zotero is a bit complicated, because you can't view the annotations without the files, and the files no longer exist in the same location. Possible, but it would be a bit tricky to do.
If you're OK with just the comments, one option might be to use an SQLite database browser to open the zotero.sqlite.bak file (or zotero.sqlite.1.bak, depending on the timestamp) and extract the 'comment' field from the itemAnnotations table to a CSV file.
I will try the DB browser as I am running Zotero on windows.
Using the SQLite DB browser (https://sqlitebrowser.org) it was a breeze.
Many thanks.