Logged out from Apple ID led to deleted vault

Use case or problem

My vault was deleted from my mac when logged out form apple ID. I’m subscribing to Obsidian Vault which then led to the vault being deleted from all my devices.

Proposed solution

Implement a protection for scenarios when the underlying vault folder structure is deleted from one device.
Great to see the restore files feature but I had to click 589 check boxes instead of having a “check all” button to restore everything.

I was contemplating on using git to archive the vault at a given point but this wasn’t recommended based on my research. Having a vault backup feature could be another approach to allow users to restore to a point in time when things like this happen.

Current workaround (optional)

Restore files via Obsidian settings

git is a version control tool, not backup but can be used to revert to earlier state so in a way can be used for scenarios mentioned – highly recommended

I’m surprised logging out of your Apple ID caused files to be deleted. Was your vault also in iCloud? Apple’s help page only mentions iCloud files. If you sign out of your Apple ID settings on Mac – Apple Support (MY)

Definitely check out the Obsidian Help site’s page about backups: Back up your Obsidian files - Obsidian Help

I had my vault folder in the documents folder synching with iCloud. Gosh did I get a fright when I saw my notes disappearing!
The other potential work around would be to log back in with appleID to restore the folder.
It just felt quite intrusive that this operation wiped all notes on all devices.

I’ll look into GIT but I went the Obsidian Sync direction for simplicity and data privacy. Adding git to the picture would add complexity. Obsidian has a concept of saving revisions of files and restoring them but it’s not made to work at scale…

Thanks for sharing the link about backup. My feature request would be to add this as an offering to the Obsidian Sync service and potentially charge extra for an archiving/backup feature.

The Apple help link I posted earlier says when you log out of iCloud it asks whether you want to keep copies of files on the device. I guess you chose to remove them, and Obsidian was open when you did it (or you opened it afterward)? When you remove files, Sync reasonably assumes you wanted them removed. I think it would make sense for Sync to pause and notify if it sees that every file in the vault has been removed — but I don’t know how doable that is because it syncs on autosave, which happens every few seconds, which could be longer than it takes to delete all the files.

Backups won’t add much complication to your setup — especially just hooking up Time Machine for your local backups. You shouldn’t need special, separate backups for Obsidian (altho you can do that too) — you can just include its files in your normal backups.

There are some other discussions here about the situation of files being deleted from under Obsidian (when people use network drives that get disconnected, etc.); I don’t remember their contents but it may be worth finding and reading them.