Lost 2 hours of work due to iCloud sync issue - is it common?

I was on 13 hour flight and decided to write some notes in Logseq on my iPad. Ended up jotting a lot of good thoughts for 2 hours.

I use iCloud to sync iPad with my 2 computers.

I started writing offline but then I realized that I have free WiFi on my flight. So I connected to the internet. After browsing for a few minutes I opened Logseq again and didn’t believe my eyes - all my notes from that date were gone.

Is it common with iCloud sync?
Is there any way to restore my notes?

That must be horrible, to have your notes disappear like that. I don’t know if there’s a way to recover your notes. I do know that to prevent this kind of loss, it’s better to write off-line notes in a separate page, so there’s no page with the same name on another device or on your iCloud drive that can overwrite your recent notes when you reconnect to the network.
I know this doesn’t help you recover your lost notes but it may prevent future losses in similar circumstances.

Another option, by the way, is to copy the Logseq pages you had been working on to another location on your iPad before turning the wifi on. Then when iCloud syncing has caught up, copy them back to the Logseq directory.

Check the logseq/bak folder

Is there a bak folder on the iPad? I don’t see one but it could be hidden.

I suspect, by the way, that you’ve hit an interesting edge-condition with iCloud syncing. If your iPad was in a different time-zone, a few hours behind the one your other device(s) were in when you reconnected to the network, the time-stamps on those other file(s) would have been more recent than the one(s) on your iPad. So even though you edited them later in actual time, they looked older to iCloud. I think …

It’s stored inside your logseq database, you will see pages, assets, journal and logseq correct?

Inside that Logseq folder, there willbe another called bak

1 Like

Got it. I was looking with my nose (Dutch expression for when you don’t see something that’s right in front of your eyes) :-).

Thanks everyone for suggestions. I looked in “bak” folder and there’s nothing there from that day. I guess I will need to type the second version.

Funny enough for a part of my notes (30%) I took a screenshot before turning WiFI on - at least now I can OCR them back!

1 Like

That has happened to me twice. In general, iCloud sync is quite imperfect/sucks. If we could sync through a Dropbox folder between devices, that’d be much more reliable…

I small work-around I’m using is having a git repo to keep the notes. Then, I make such to commit when moving from one mac to another. That doesn’t help with mobile devices though ¯_(ツ)_/¯.

1 Like

It can work with iPads too, by using Working Copy - a git client for iOS. I use that as a backup as well.

Hi, i am new logseq user. I like this app so much. But i also have a experience to loss datas. And no files in the bak folder. This is very frustrating. You work hours and then all is gone.

I don‘t like to save my data in github. I have very private notes. It will be a good solution when it was possible to save versions of the .md files on the local storage in a separate folder. Is this possible? The same on iphone and ipad.

Thanks for your response.

1 Like

I had the same thing happen to me working across the same devices… I then switched to using working copy so I at least could commit the change locally.

1 Like

Unfortunately you can’t rely on iCloud Drive. I don’t even know if this is a Logseq issue because I’ve ran into issues with iCloud separate from Logseq (very slow uploads, stuck uploads, and inconsistent syncing behaviour).

As others have mentioned it seems like using Git/Working Copy is the only way to have any kind of reliable syncing between mobile/desktop

1 Like

I have also noticed sometimes that my Logseq/journal folder keeps my iOS and desktop updates in two separate files if there is a collision. Look in the folder for see if you have multiples for a single date. Not ideal but better than losing your work…

It happened to me too. Now I agree that iCloud sync sucks - at least iCloud couldn’t satisfy Logseq’s requirement

I’ve switched to Working Copy, and I’m very satisfied with it now:

3 Likes

That happens to me sometimes, even if I am online… And that’s the only thing that pushing me from logseq and keeps me in roam research. If at least logseq has a status syncing icon as roam research, it would be great

Hi, can you tell your workaround how you do that?

:point_up:That’s the way to go! Thanks for the two git hooks in there – I’ve so far used https://github.com/logseq/git-auto/ for that purpose. The hooks make far more sense :slight_smile:

The only annoying aspect of syncing via git: when using Apple Shortcuts on both macOS and iOS – e.g. for easily adding content to your journal without opening Logseq – you have to set up different folder bookmarks in those shortcuts on each platform.

breadcrumbs from my own frustrations, which i hope someone will find useful:

syncing my iPhone to windows 10, i’m running into a fairly regular issue with iCloud sync where the file on disk conflicts with the file in Logseq.

inside the iCloud Drive folder, i will usually find another version of the file with (1) appended.

usually i’ve just lost a bit of the content, so it’s not hard to just replace the contents of the original file.md by pasting the contents of file(1).md (using a different text editor).

my typical “fix”:

  1. shut down logseq
  2. open both conflicting files in text editor and quickly scan to find the version i want. (could sub this for a proper diff tool if you are really worried about the complexity of the changes)
  3. backup the file.md file by making a duplicate
  4. either rename the desired version to file.md, or overwrite the contents of file.md by copy/pasting from the desired version to file.md
  5. restart logseq (which usually hangs at the beginning while it syncs iCloud Drive)

some other diff tool/workflow could be used to remedy a more extreme situation. this is definitely a major advantage of the modular text-based approach of logseq.

a git based approach would be more robust, but i really don’t feel like setting up git on iOS.