How obsidian nearly lost all my files and scared the crap out of me

I use obsidian from a windows machine, a linux machine, and an android phone. A few days ago, I accidentally ran a command on my linux machine that deleted every file in my home folder. Obsidian was running at the time. The command was in the terminal, and was a normal rm/find mistake, not anything specific to obsidian. But I didn’t realize it had happened right away, and kept browsing the web for a few minutes (this keeps working for awhile because Linux keeps files that were deleted but still open in memory).

I pay for a subscription and sync everything exactly because I was paranoid about this kind of mistake! And I use multiple devices, so I should be fine right? Apparently not – obsidian apparently decided that since the files were deleted locally, IT SHOULD ALSO SYNC THE DELETION TO THE CLOUD. All of my devices reported the files were gone.

Well, no problem, because Obsidian saves snapshots right? I have never changed the default settings so they should be there. When I go into Snapshots and click “View” nothing appears. When I search for a date I know had a daily note nothing appears. There were no snapshots!

The ONLY thing that saved me is that hidden in the Sync section is the bulk restore for deleted files. I’m really glad it’s there, but this should never have been the behavior in the first place! One minor nit: the bulk restore is useless on mobile because there is no “Select all” button and there is no shift key you can hold down while clicking the bottom. I had over 1,000 files deleted, so this would have taken ages. Thankfully I also use Obsidian on my windows desktop and could do it there. In summary:

  • JFC don’t sync file deletions from outside Obsidian to the cloud, as a paying customer seriously what are you all smoking

  • Snapshots apparently don’t work in this scenario. It seems they only show up for files that aren’t deleted, which at least partially defeats the point. It would have saved me some substantial pants shitting if it showed deletion as one of the revisions, or had a note about only non-deleted files appearing there and where to separately look for deleted files

  • The bulk deletion dialog needs a “select all” or a way to specify everything in a date range.

Sorry if this sounds ranty, but the entire point of paying is to avoid nightmare scenarios like this. I want to emphasize the bulk restore DID WORK, but I don’t know long files stay there and somebody without a plan would probably be screwed.

Sync and backup are two completely different things. Never rely on a file sync as your backup, since as you’ve seen, part of sync is delete/remove. I would recommend the Git plugin to copy your vault up to Git, and maintain a list of changes. Also, on Windows I use the ‘File History’ feature, as well as a scheduled full backup to a NAS. I’ve lost files multiple times, and each time I try to learn from it so it doesn’t happen again. Having multiple fall-backs will save you somewhere down the road! Glad to hear you were able to recover, make your plan on how to prevent the next one…

5 Likes

There are also 2 backup-plugins which do a nice job :+1:t2:

Hello!

First I am sorry for you bad experience. I think it stems from the misunderstanding of sync vs backup. We even have a page for that in the docs.

In a nutshell, even though obsidian sync has some backup functionality it is not (and should replace) a backup solution.

Regarding the other points:

This is an intentional decision. We guess it’s what most users want, so they can operate on their vault outside obsidian and still have their changes synced.

Version history for individual deleted files is available Settings->Sync->Delete Files

We’ll think about this. This has the potential of creating a mess if the users doesn’t understand what they are doing. Please, Open a feature request for it

1 Like