Let’s say I have two vaults one I want on Obsidian Sync and one I manage locally. Well, when i switch back between the vaults, sync thinks my local vault is a part of Obsidian Sync and erased everything in my local vault. How do I manage these both without sync thinking everything is my Sync vault? This genuinely scared me
Things I have tried
I was able to restore it using obsidian version control and pause sync on my local vault. However, I do have multiple local vaults I manage and don’t want on sync and am now very afraid to open them.
I have multiple vaults not connected to Sync kicking around (archives, testing, etc.). My two main vaults are using Sync and connected to their respective remote vaults. They are all silos with no interaction between any of them - using Sync or not.
It sounds like you may have unintentionally nested vaults in some way?
What are the paths of the vaults on disk? Are any of the vaults within another vault? I’d investigate that as a possibility to start.
Is a cloud service watching the Documents folder? OneDrive, iCloud Drive, etc.? If one is and it removed some files (removed local copies of files/folders to save space or whatever), Obsidian Sync will register the files as deleted and propagate that change to the remote vault and other devices.
Can’t say for sure that’s what happened here, but a possibility.
EDIT:
Just to get a clearer picture of your setup, is it something like this?
Documents/vault 1 - Sync enabled and connected to a remote vault
Documents/vault 2 - not connected to a remote vault
Documents/vault 3 - not connected to a remote vault
Documents/vault 4 - not connected to a remote vault
…and you switched from (for example) vault1 → vault2, and files from vault1 were removed?
Documents/vault 1 - Sync enabled and connected to a remote vault
Documents/vault 2 - not connected to a remote vault
It was my first time setting up sync and i set it up with vault 1 and after experimenting i wanted to switch back to vault 2 and then when i did it deleted everything in vault 2 and overwrote it with everything in vault 1