Obsidian sync deleted all my files

I went away and left my laptop for two weeks. Upon coming back, I see some notes have vanished from obsidian on it. I then put sync on (which I thought I had left on)

expected the files to sync back from the vault

Actual result

As obsidian was open on my ipad, i watched the files then delete themselves off my ipad too! Clearly the sync had then sync the deleted files to the vault.

Expected result

Environment

  • Operating system: Windows PC
  • Obsidian version: 0.12.15

Additional information

All my files were in the sync log as deleted but I couln’t restore them - if I tried it said it was “already on latest version”, and in any case if it had worked I would have had to do it 900 times!
Thankfully I had a backup from 3 weeks ago so I copied that into the area on my PC and it all sync happily back into the vault. I have however lost all formatting / plugin settings so had to redo that.

I didn’t have it backed up in icloud or anything so there should be no issues due to that. 4 files made it without being deleted - 3 daily notes and one file I made the day I left. Two files had sync during my holiday and had not deleted themselves, and one file from today was there too. I have no idea why this happened and it was very distressing! An additional weird thing is that no files were in the trash (in obsidian) or in the recycle bin (on my pc). It was like they never existed to begin with.

I’d rather this not happen again, and now feel like I can’t trust obsidian sync, so would appreciate if a reason could be found for how this happened.

Thanks

2 Likes

I am a little confused by this.
you said Obsidian sync was off. There was a vault with “deleted” or “missing” files. Sync was activated. Sync propagated the deletion.

Is Sync really the problem here? who/what deleted the file in that computer in the first place?

Did you do some mass file move?

Do you see which device made the deletions? From the sync log or the deleted files, you should be able to see the device ID that deleted the files. Once you do, the next step would be to figure out why those files were deleted in the first place - since you said you noticed some notes vanished from your vault, I think it’s likely that Obsidian Sync “picked up” the deletions from your system and propagated those to your other devices.

I would recommend using a backup setup, whether it’s a third party system or just an app that makes copies/zips/backups, as Obsidian Sync is more optimized for synchronization than backup.

Right now, it’s best that we figure out why your files “vanished” in the first place.

1 Like

I am 90% sure I left sync on, but it appeared to be off when I got back to my computer. So it may well have had nothing to do with sync, but I have no idea how in that case!

The files had been deleted on my laptop, but like I said they hadn’t been moved to the recycling bin or anything - just vanished. I hadn’t touched my laptop in two weeks, so I’m struggling to come up with a reason that doesn’t have to do with sync. At the time, I only had the calendar plugin enabled, as there was an issue with plugin sync getting confused and syncing the wrong way before hand. So I don’t think it was a plugin issue either

It was definitely my laptop that made the decision as before i turned sync back on all my files were there on my phone / ipad. I’m intending on backing up each weekend now to be safe, but yes right now I would just like to figure out why it happened in the first place :slight_smile:

By looking at the sync logs in your laptop, you should be able to see at what day/time the files were deleted.

I think the problem here is that Obsidian on the laptop was not open while the deletions happened, and the moment Obsidian started running, it realized the files were deleted on disk (within the last 2 weeks where the user did not use Obsidian) and started propagating that.

Yes exactly

This is absolutely a problem with Obsidian sync – according to cgp grey:

“I installed [obsidian for ios], synced my database, and lost 50% of the data.”
~cgp grey

Maybe related to Obsidian Sync seems to delete files? - #61 by WhiteNoise ?

Since that video is from march, I assume the issue is solved.
Regardless, we are gonna wait for that person to file a bug report.

This was because Obsidian for iOS was in the very very early alpha phase back then (it was on our first alpha build). We’ve since released ~20 new builds with bugfixes for those kind of issues.

I thought you had said that your problem was when using iCloud. This thread is about Obsidian Sync.

1 Like