Change sync target -> lost all notebooks

  • The version you are using:
Joplin 2.4.9 (prod, win32)
ID client : 4abbb6b47e5446ac89ef43d0d5060265
Version de Synchro : 3
Version du profil : 39
Trousseau supporté : Oui
Révision : bb44c4e
  • If it is a sync issue, please let us know what you are syncing: was previously syncing with Dropbox, then selected OneDrive
  • If you report a problem with upgrading, please let us know both versions (from/to): last upgrade was successful (Dropbox syncing at that time).
  • If you report a problem with the editor, please tell us which editor you are using (WYSIWYG/Markdown).
  • The operating system you are using: Windows 10 Family

If you can also please provide a log, as described here: How to enable debugging | Joplin

What happened:

  • Joplin was syncing with my Dropbox. So far so good.
  • I wanted to sync another machine but have a limited Dropbox account, so decided to sync with OneDrive instead.
  • Went to Settings > Synchronization and selected 'OneDrive'.
  • Once authorized, Joplin started to sync with OneDrive.
  • Once done, all my notebooks have vanished and I just have a 'Conflicts' notebook with a lot less items than before!

Is there any way to get my notes back if I switch back to Dropbox?

Thanks in advance for any help!

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

Thanks for the detailed advice!

Actually, I didn't suspect changing sync target was such a big deal and didn't export my data. Now I've launched Joplin again to follow your procedure and just reach a blank page... :grimacing:

Is there any way to set the sync target back to Dropbox by editing any config file?

You should still be able to access Joplin itself. Check that it hasn't just gone to your system tray, kill it there and restart it.

Already done, but to no avail... In the mean time, I've created a full copy of the Dropbox folder but now I need to instruct Joplin to read from Dropbox again: is there anything I could tweak in the settings.json file?

I wouldn't like to comment on that. The fact that it doesn't start properly is a bit confusing as I wouldn't expect that, you should still be able to get to the menus.
Restart the computer and if it still isn't working then you will want to provide a copy of the logs for people more knowledgeable than I to look through and advise.
I don't think changing the settings through the backend will work for what you are trying to do as whilst you might be able to change the sync target you won't be able to set the state for forcing the re-download and instead might accidentally push your new "blank" database and overwrite your Dropbox with empty data.

OK, go for a full reboot! Back in minutes...

Looks like Joplin is syncing again with Dropbox, so I'll let it go for a while and will let you know later if it managed to retrieve all my notebooks.

Thanks again for your help!

1 Like

OK, sync is done, but some notebooks are still missing! As the initial sync with OneDrive has pushed a lot of files to the new target, maybe the missing notebooks could be retrieved from there.

Weird method: copy all files from OneDrive to Dropbox and try to force new sync. Any chance of success?

Thanks in advance for your advice!

You shouldn't have anything missing if your Dropbox target was up to date? Did you do the force download Delete local data and re-download from sync target as that should pull literally everything from Dropbox.

I've just seen what you also put in the Github issue page - something odd seems to be going on here.

Yes, I did! What's surprising is that I had 4 main notebooks and a deep hierarchy of sub-notebooks:

  • Help & templates
  • Misc
  • Private
  • Business

The 3 first notebooks have been fully restored (as far as I can see), the Business one is missing. Don't understand why...

What about my weird idea of copying all files from OneDrive (which seems to have sync'ed on my first trial) to Dropbox and relaunch a Delete local data and re-download from sync target? Is this feasible in any way?

Thanks again for you help!

UPDATE
Ok, so here's what I did this morning:

  • Explored OneDrive\Applications\Joplin and found out the folder was 138Mb! Too large for a "failed" sync...:face_with_raised_eyebrow:
  • Copied all files on my laptop for security sake
  • Opened Joplin>Settings>Synchronization and set the sync target back to OneDrive
  • Selected Delete local data and re-download from sync target

and BAM! All notebooks are flowing back into my local Joplin instance!

Lessons to learn:

  • Always do backup before any change, whether dubbed critical or not
  • Always clear data first, so you know what's the initial context
  • Keep trying, IT is not an exact science and something could finally work! :grin:
  • Be humble and warmly thank all you provided help and guidance. So I do. :pray:

By the way, I really don't understand what happened yesterday... :thinking:

4 Likes

I'm also a bit lost on what happened here but that inital problem you had seems very suspect and I think is worth trying to replicate to see if it is an application problem that needs to be resolved.
I'm glad that it worked though!

You're right and I'll try to replicate the issue... after the proper backup! :wink: I'll document it if I manage to and will put all information on Github. Thanks for all!

2 Likes

Last findings: mobile app has been configured to sync with OneDrive too but doesn't display all notebooks. Is there any Delete local data and re-download from sync target for the mobile app too?

Other point: in the Settings menu, all titles are truncated! I read Genera, Not, or Markdow... It isn't related to the portrait/landscape orientation: any clue?

I don't think so, might be worth just uninstalling it and re-installing it.
I don't know about the titles, all appears normal on mine.

Tried to uninstall/reinstall this morning, but it seems the initial sync will last roughly a month and a half! :grin: Don't know if OneDrive secure protocol is really lazy, but I'm now into the sync for 1hour+ and the mobile is still downloading items (and only 1 notebook displays in the list)...

By the way, here a screenshot of the menu, as the re-installation didn't fix the title issue. Hope this helps.

Have a good day!

The mobile app pretends the sync is done, although it doesn't display any notebook! These notebooks are correctly available through the desktop app, so the issue is on the mobile app only.

Once uninstalled, is there any data or folder I should purge manually on the mobile?

No. All data is stored in the app folder which should be removed when you uninstall.

Hi all!

I've uninstalled/installed the mobile app several times but to no avail: any notebook other than TEMP doesn't display on the mobile, although it's accessible from the desktop. I'm lost at finding any reason for that: any clue?

Thanks in advance for any help!