Synchronization Status - error message XXX could not be uploaded: File not found

Did you manage to sort out your sync errors then by restoring the backup?

I have a few things now to mention:
-I previously thought that the orphan resources should get automatically cleaned up in line with the note history setting. I think that is probably not the case, but I think the code I saw might only get invoked if using Joplin Server / Cloud as the sync target for the orphan resource cleaning to happen, which is a server side maintenance task rather than a client side task
-Resources are not truly orphaned if the note history still references them, so selecting from the notes table alone will not truly identify orphans
-It was recently mentioned that you can use a Joplin plugin to do orphan resource cleaning. See this thread for details Getting and deleting images / resources