Data loss with Google Drive

Sorry about the dramatic “Obsidian not safe”. Losing several hours of notes gets a bit emotional :slight_smile: and I am not an frequent bug-reporter. Should have known better.

Version is v0.11.5. Only using core plugins, most are activated. Not using plugins: Sync, Publish, Audio Record, Slides or Zettelkasten prefixer.

Running macOS Big Sur, Intel-chipped 2019 MacBook Pro.

Regarding reproduce steps: that’s a challenge.

  1. Vault is located in my ~/Google Drive/ folder. All notes I create should begin their life as local files before being copied to the cloud. I don’t currently have any other machines syncing to google drive, so it isn’t a conflict with other computers. Nor is it a network connectivity issue.
  2. At some point during the course of taking notes. As far as I can tell, I lost something that was previously created. I made changes to it. I might have closed it or switched it to preview mode, and suddenly the changes were gone.
1 Like

There ought certainly to be a version history in the cloud. If there isn’t then, as Licat suggests, it would seem that your local Drive folder isn’t syncing. Would definitely be worth checking your settings.

In any case, GDrive deletes old, non-current, versions unless you set the file specifically to keep them.
Although I have all of them, I prefer Box and Dropbox for this type of active syncing for programs like Obsidian and Scrivener.

1 Like

Interesting. Any particular reason you feel alternatives like Box or Dropbox are safer?

On the one hand, I’m pretty convinced it was Obsidian per se. On the other, I don’t understand quite what I did wrong, which is the scary part.

This might verge on a feature-thought:
I do lots of coding and markdown using Rstudio. I always work on active files stored in Google Drive. Saving in the Rstudio IDE is expected to be manual (command + S). But if Rstudio quits and there are unsaved changes, those changes are by default stored in a local, non-cloud drive file, so on re-opening, the user looses nothing. Would something like this be possible or relevant for Obsidian?

Similarly, anyone using gDocs will know that losing any changes just does not happen, whether or not docs are stored locally. One becomes habituated to not manually saving things.

Did you check your google drive settings if you have nonlocal files?

How is it possible that you have no history for changes?!?

Yes, I checked Drive settings. Files are local. I am sure. In general, there is history of changes. The problem is a randomly lost few hours of changes which were never tracked and disappeared from Obsidian.

Any particular reason you feel alternatives like Box or Dropbox are safer?

As stated previously, there are known issues with Google Drive and other software like Scrivener. As you don’t definitively know what caused the data loss and reproduction seems unlikely, eliminating variables seems like the next step.

  • verify there aren’t any other processes modifying your vault files (on OS X, use lsof)
  • maybe there is an accidental shortcut for the ‘Delete current file’ pallet action
  • try running a local vault
  • try a different approach for sync and backup (git, dropbox, etc)
1 Like

My own experience is that Apple, Google and Microsoft Drives are at their best with their own programs. And I’ve had many irritations with all of them. OK for pure storage, but their syncs for other files can intrude. Box and Dropbox have to make it on their own and I’ve always found it a smoother experience. And reviewers seem to concur most of the time. But they all have their own idiosyncracies.

So Obsidian back up 2 seconds after you stop typing. Assuming that must have happened a few times, the Google sync can’t have been functioning correctly else there would be saved versions online.

Sync programs clashing with autosave can result in problems. A safer approach would be having the working files in a local only folder; using a local backup program to backup (one way only, not sync) that folder regularly (2 minutes, 5 minutes - whatever works best for you) into your Google Drive folder which then manages its own schedule for online sync.

2 Likes

Thought I’d do quick test using a (Windows) laptop. Involved setting up a local Backup and Sync folder since I didn’t even have it installed on this computer.
I did 4 saves. Checked manage versions on local file and it told me there were no previous versions! Checked online Drive and they were all there.

The limited configurability reminded me of why I don’t generally use it.

1 Like

What Happened:

I was using Obsidian for only one vault but recently I started using another vault. After 2 weeks, I went back to my first vault and found out that about 1 to 2 weeks of data from the vault was vanished.

What was removed:

Links and notes were removed from the vault that I wrote about 1 to 2 weeks since I left the vault dormant.

Additional Information:

I was using Calendar Plugin in the vault. I am not using any other plugins. I am also using google drive for syncing my vault.

Why I posted this:

I know it might be because of something with the plugin or sync. But it will be really helpful if someone could guide me how to get my data back. I really need those notes!

Check versions in your online Google Drive.
There should be one with the data, but be aware that it deletes old versions more than 30 days old unless you have specifically marked the file to keep all versions.

Does this thread help? Unfortunately I don’t have a good solution to your problem.

They suggest that Google Drive is the likely culprit. You could try:

  • Recovering your notes from the Google Drive trash or history
  • Alternative syncing methods (other than Drive)

I tried, but there is no note history of the vanished notes. it’s like the never existed. it’s very confusing.
I should try another syncing solution as @schemar suggested.

Wait, IF I open Google sync after sometime, will it override the files or something like that?

The online file should have all versions saved in the last 30 days. Should be able to right click and go to manage versions.

If there’s nothing there then the sync isn’t working if there were file changes within those 30 days.

I’d advise doing a quick test with your new vault to see what is actually there online.

If a file is empty locally, then sync ought save that to the cloud when it’s a change.

It’s very odd that they don’t appear at all in Gdrive. Something is going on.

Does this help?

https://support.google.com/drive/answer/2375102?co=GENIE.Platform%3DAndroid&hl=en#zippy=%2Cyou-cant-find-something-you-dont-think-you-deleted-it

The new vault is not synced to the drive, if you are asking about that.

But I have put the new vault in totally different location.
The Activity panel is not showing any latest change I made to the vault.

No, No files were deleted in the GDrive, so trash is empty. The sync was not doing it’s job for some reason. It didn’t even catch the changes( I think ). But how did the local files got manipulated? I don’t know about that.

In your vault that is currently on google drive, can you test if you create a new file if it gets recognised and uploaded on gdrive?

Yes it is now recognizing the new files. Could you suggest an alternative. I don’t want this to happen again even if it is fixed for now. As Obsidian is not officially supporting the Plugins till v1.0. One more thing, will Github be suitable for this?

I don’t think this is a plugins problem. I am very baffled that there is no history at all in Gdrive for these files.

If you keep gdrive off, create a new file, and then turn on grive what happens?

Are these files in gdrive you own or are these files in shared google drive ?