Syncing issues

Hey all,

I am having issues recovering my old notes. I have my Joplin files backed up into an external hard drive. I disconnected my hard drive and reconnected it, but now all my Joplin notes are gone on my computer. All the files are still in my hard drive. I made a copy of the whole folder before trying to re-sync Joplin, but none of the note are showing up despite all the notes being present on the hard drive just like before.

Every time I try to sync, it will complete syncing without any files being synced. Then, when I tried importing from where my backup is stored, but all this does is create two notebooks called .resource and . sync. When I import from this backup, the report from the sync says that 2303 notes were synced, but nothing shows up Do you all have any suggestions on what to do?

EDIT: I clarified and added that I attempted to import with no success. And I am adding some pictures to show what is going on on my computer in hopes that this may help.

Screenshot1: This is what my files on the backup look like

Internally Joplin saves the last file timestamp that’s been synced. Then on next sync, it only synchronizes the files with a timestamp more recent than that saved timestamp. My guess is that in your case all the timestamps of the files are older, so it doesn’t sync anything.

The best solution is to delete your local profile, setup Joplin again, and sync with your directory. You didn’t say what sync method you use but I assume it’s filesystem sync?

Another possible solution is to set the timestamps of all your files to the current time, but not sure if it will give the expected result.

1 Like

I appreciate you taking the time to help me out this. I have to admit, I am not the best with computers. So bear with me. I am using a filesystem sync. The back up is syncing to my external hard drive.

I tried uninstalling and re-installing Joplin. I am unsure if this would delete my local profile automatically, or is there something else I need to do?

EDIT: Holy crap! That really helped out! Thank you so much for all the help. Just for future reference for other users, I went to (C:\Users[ME].config), and I deleted the “joplin-desktop” folder. I uninstall and then Joplin. Then, I set my sync settings to my external hard drive where my back up was. Then when I synced my files and it fixed it!

1 Like

Just for what it is worth, a sync is NOT a backup. If you screw up something, then your sync will backup your screwup. Which obviously isn’t a backup or what you want. Also, a standard backup is going to be difficult, though I do those, because the database must be coordinated with all the resources and files, so I think even a standard backup could have issues after you majorly screw up, like deleting a couple notebooks by accident. A standard backup would never remove any of the files you had actually moved or intentionally deleted.

I think the safest thing to do is do a zip backup of Joplin and all folders and keep a few versions of it. Many inexpensive backup programs will automate a backup and archive versions and zip.
I use 2nd copy for that purpose. For the extra cautious you can have an online backup backup that backup off-site.

Has anyone considered this kind of zipped backup option getting integrated into Joplin?

2 Likes

It is integrated. File -> Export -> JEX - Joplin Export File

It exports all notes and all resources after which it creates a tar file with the extension .jex. If you want to restore the backup, you just import the jex file.

2 Likes

Yes I missed that part. Sync is definitely not backup. For backup, the best is to use the JEX export format or the RAW format (JEX is just the raw files in one archive).

Thank you all for the tips. I’ll be sure to make a back up to avoid future scenarios like this.

I never really thought of using export to backup. I tried your suggestion and it is great. Will definitely make this part of my weekly schedule. I clip a lot of web pages and so have lots of compressed images, but for what it is worth here are my file sizes. Note that the exported jex is smaller than my zipped folder.

Joplin data folder: 266 mb
zipped folder 201 mb
jex: 199 mb (tar)
7zipped jex: 153 mb

Perhaps some way of making this more obvious, like having a backup button or file option which is just the export or export plus compression? Even better from my very conservative viewpoint, a way to set it up automatically, like an option for daily backups.

Anyway, thanks for the help

I see what you are saying. Well, I guess Laurent will have to decide, if he wants to add that.

For my part, I use the cli app and a cron job to do my backups.

Here’s my backup script:

#!/bin/bash

export NODEJS_HOME=/usr/local/lib/nodejs/node-v10.15.3/bin
export NODEJS_GLOBAL_HOME=$HOME/.node_modules_global/bin

PATH=$HOME/bin:$NODEJS_GLOBAL_HOME:$NODEJS_HOME:$PATH

export PATH

#D=`date +'%Y-%m-%d'`
D=`date +'%Y-%m-%d_%H-%M'`

joplin sync
joplin export --format jex /data/backup/joplin/joplin_${D}.jex
find /data/backup/joplin/ -name '*.jex' -mtime +28 -exec rm {} \;

This always keeps the most recent 28 backups.

You should add this script to your github repo with the remove orphaned resources script. :grinning:

Hmm, the script is very specific to my environment and I never thought that this script is very useful, except for explaining how to export on the command line (which can also be found in the help).

But I can make a few annotations and add it to the repo, if you think it will help people.

I experienced this problem in the last few days and no matter I did it would not sync beyond a point and doing sync for the same files all over again but not getting the missing ones.

The sync was done with a Nextcloud server with WebDAV.
In desperation, I disabled the webdav connection and I set it up to a Local folder that was synchronized by a Nextcloud desktop client. Not only the synchronization was perfect but it also was about 10 times faster.

I'll keep it this way for now, but I believe that the webdav sync has a big problem, either on Joplin's side or on the Nextcloud side, which is updated by the way.

After updating to Joplin 2.12.17 on Windows 11, I got that the sync target needed to be upgraded. But that failed.
I'm running S3 Sync up against BackBlaze - and until the update it worked perfectly.
And now the sync failes with "Cannot read...".