I don't use the visual editor. I always use the markdown-editor.
Any hints how to recover the attachments?
Right now I'm copying an old resources-folder from Time Machine and searching for every single attachment to copy it in the note again. Very time consuming.
If the references still match up between your markdown and the filenames in your backed up resource folder then you should just be able to paste them into your resource dir as well as the one on your sync target.
I would advise making backups before doing much else though - if you don't have the simple backup plugin then install it and run it in case anything unexpected happens.
So, I have to copy the resource to the resource-dir on my mac (I just work on) and to the resource-dir on my nextcloud-server? Did a understand that correctly?
In theory, yes. Just make sure you do the backup first in case anything does go awry somehow.
Yes, the backup is running.
Whatever the outcome, thank you for your support!!!
And another question: Is this a serious bug?
Depends if it can be replicated or not which is what I want to find out, I just cant do it right this moment.
If you are reliably able to replicate it then it might be worth detailing the exact steps taken and providing log files showing the deletion etc.
Ok, I understand. I will try to reproduce it but I use Joplin for my whole private und work life. I have to rely on the program.
Does joplin always create logs? Or do I have to turn it on?
Here one attachment is removed. Looks normal except the attachment is still in use: 2022-04-16 16:40:44: Synchronizer: "Sync: deleteLocal: remote has been deleted: Resource: (Local f2fc0ca6e96dc858145687664e55d756): (Remote f2fc0ca6e96dc858145687664e55d756.md)"
@Recovery: Should it be enough only copy the missing attachment on the server resource directory and than sync all clients? Because: I can not copy the missing attachments on every device (i.e. iPad).
Arg, I can not copy it in the server-directory: On the server all resources have the ending .md.
Maybe I should use the option "Re-upload local data to sync target" after copying all missing attachment on the local resource-directory?
That might be worth doing indeed, it is worth seeing if you can get just a couple of clients working and playing nicely with the sync target then extend it to other devices.
Joplin doesn't notice that I copy a resource back to the resouce-directory.
I assumed the reupload would be able to recognise it.
If the notes show correctly locally now you copied, does a JEX export (either Export all > JEX or right click on a notebook) contain your missing resources or not? (You can open jex files as a compressed archive)
Ok, I start upload all loal resources. This would last a few hours, I think.
No, in the JEX-file are only the correct attachments. I have export a note with 2 correct attachments and 7 orphaned resources. Only the 2 correct attachments are there.
I often work similarly with attachments, but could not find this problem.
- Create Note A with one resource
- Check the resource id in
note_resources
, there is now an entry for this note - Copy the md resource link from note A to a new created Note B
- The resource id now has two entries in the database
note_resources
Could you look in the database.sqllite
with a SQLLite tool (Like SQLiteDatabaseBrowser) if there are entries for the resource id in the table note_resources
with the following command select * from note_resources WHERE resource_id = 'XYZ'
?
There are no entries in the db for an example resource-id.
@laurent possible I have found the bug. Could some one replicate this.
- Create
Note A
withresource A
onPC A
- Create
Note B
onPC A
and add the md resource link fromresource A
- Check the table
note_resources
forresource A
, there are two entries here - Sync Joplin to your sync target
Check onPC B
the tablenote_resources
forresource A
, there is only one entry here and it is fromNote A
- Wait a lite bit
- Check on
PC B
the tablenote_resources
forresource A
, there are two entries here, forNote A
andNote B
Therefore, the resource is deleted when Note A
falls out of history, even if the resource is still used in Note B
.
Ok I was probably too fast when checking the table after the sync ... after a while the second entry is also present.