Operating system
Linux
Joplin version
3.2.12
Desktop version info
Joplin 3.2.12 (prod, linux)
Client ID: 81d315c8a95e44dcb87093767ba51a90
Sync Version: 3
Profile Version: 47
Keychain Supported: No
Revision: d6f1ca4ba
Joplin Batch: 0.2.2
Joplin Disk Usage: 1.3.2
Markdown Prettier: 0.1.0
Sync target
Joplin Server
What issue do you have?
A few months back I noticed the size of the /home/blackfrank/snap/joplin-desktop/current/.config/joplin-desktop/resources had almost doubled (to 15gb)
I ran a dupe check and found the folder contained almost 15k duplicate resource files.
Recently I found time to check further on this.
I extracted a file name listing from my resources folder to txt, and also dumped the notes table to txt, next compared the txt files to ID which files in the resources folder do not appear on this table (i.e. are orphans).
After a tedious exercise, I identified 16k files that were not referenced on the notes table.
I moved these files to a separate folder, (using a bash shell script) with syntax like so
mv -v ~/snap/joplin-desktop/93/.config/joplin-desktop/resources/004ba4d7f2de4dc9b31ac537b331a17e.jpg ~/Downloads/joplin_orphan_cleanup/5_bash_script_orphan_resources/orphans/
Then ran further sanity checks, and finally moved them to my bin.
Finally, in Joplin (under sync options), I set the process to "Re-upload local data to sync target" and ran the sync so that any orphan files are removed from the server
This process seem to have worked well, but I am left with many thousands of sync status messages on my laptop, along the lines of
000147.jpg (64b1d54174a84f7f8c84cb91f5a9e3c1) could not be uploaded: File not found: /home/XXX/snap/joplin-desktop/93/.config/joplin-desktop/resources/64b1d54174a84f7f8c84cb91f5a9e3c1.jpg Ignore Retry
I cannot click this Ignore button 15k times, it takes a few seconds for the stored procedure to update some further underlying database tables, so this would take ages.
I tried both solutions under How to remove error messages at Synchronization Status?
- The 1st solution did not work for me. When I run this, the local db recreated with all my deleted IDs appended onto the notes table yet again.
- The 2nd solution fails because my "DB Browser for SQLite" / DBeaver SQL client accepts SQL syntax like this
delete from sync_items where id in (11073,
11074,
+++);
but then states NIL rows were impacted, regardless of whether I run this statement with 15k keys specified, or 5.
3 concerns
-
(support) any suggestions (other than sql) for clearing these sync messages.
-
(feature) is it feasible to add an "Ignore All" button next to the existing "Retry All" option?
Screenshots
- (feature) is there value in adding a "check for orphans" type menu option to Joplin, which can automate all or part of above? The Joplin Batch plugin Joplin Plugins - Joplin Batch by rxliuli is does not explain the logic it uses to identify orphans, never completes its process on my data set, starts showing orphans even after I have clean out all orphans identified in above process and has no bulk delete option for the orphans I still seem to have. I am not confident in trusting this plugin on my production dataset.