Change sync target -> lost all notebooks

Did you take a backup of your data first as a JEX export? If you did then it should just be a case of loading that back in and forcing a re-upload from Tools > Options > Synchronisation > Show advanced settings > Re-Upload local data to sync target . If you haven't then:

Essentially changing the sync target leaves Joplin to believe that you have just deleted all the files in your sync target so tries to make it match (or at least it does within the WebDav or NexCloud targets - not sure if this is different when changing entire target types).
Because your data should still be on dropbox you should still be able to get your data back.
What I would do:

  • Take a JEX export of your (currently broken) data, just in case File > Export all > JEX and I would, for the sake of completion if nothing else, take a copy of your profile which should be (if you left it as the default) in C:\Users\{username}\.config\joplin-desktop. Just copy the entire folder as a backup.
  • Take a copy of your dropbox Joplin data folder as a backup
  • Go to Tools > Synchronisation and
    • Change the Synchronisation target to Dropbox (your previous settings should still be saved I believe) and set the Synchronisation interval to 0
    • Press show Advanced Settings and click Delete local data and re-download from sync target

If the data on the sync target is correct but your local data is not, you can use this button to clear your local data and force re-downloading everything from the sync target. As your local data will be deleted first, it is recommended to export your data as JEX first. Application will have to be restarted

When you restart Joplin your local data should be gone entirely and it should start pulling all the data back from Dropbox.

If that works and you want to change again to upload to OneDrive - I would follow the same process again by taking a JEX backup + profile directory backup before changing the sync target and this time pressing the Re-upload local data to sync target which will force your data onto your new target rather than trying to copy it.
Alternatively I believe you can take your Joplin target folder from Dropbox and put it onto your OneDrive which is the process here - https://joplinapp.org/faq/#all-my-notes-got-deleted-after-changing-the-webdav-url then sync as normal but I've not tried that myself.

I'm very happy to be wrong here and for anyone else to correct me as I'd rather not be responsible for you losing any more of your data through bad advice.

I would also highly recommend making full JEX backups and profile backups whenever making any big changes like that. Alternatively use the "Simple Backup" plugin to automate it on a schedule.

I'm also surprised that the failsafe didn't kick in. When I migrated nextcloud targets the failsafe kicked in to stop me losing any data - however that is changing the target within a sync target 'type' rather than changing the entire type like you did from Dropbox to OneDrive.

2 Likes