Buy new android phone. Was on Samsung S20 FE and bought Pixel 6 if that matters
Say yes to “transfer apps” when setting up. This copies data and apps between phones.
Launch obsidian for the first time on new phone.
I immediately notice its in a weird state. only a handful of files. half setting accurate. most plugins disabled.
Sync plugin is turned off.
You turn on sync it still thinks your notes are connected to your remote vault.
It then decides that all the missing content is deleted and proceeds to delete everything. All devices mimic deleting all your content.
Expected result
I would have settled for launching obsidian for the first time gave me an empty app. Instead of a messed up app.
I would have preferred some how everything copied correctly between devices and it was magic.
I would have settled for some safety valve that kicked in and said hey you are deleting 100s of tiles you sure bro? Or maybe some sync downward only mode.
Actual result
Lost my entire vault. On every computer but one. I was able to restore it from the one computer that was turned off.
Environment
This happened on the pixel 6 latest version of obsidian.
I have no other sync implementation or copying implemented. Like Dropbox, gdrive, webdav. Only thing moving content is sync plugin. And android new phone setup.
As a suggestion for a fix I noticed not every app copied it’s contents over between phones things like authenticators booted into a empty state. Perhaps you can store some of the sync state in the protected space on Android phone so that it can’t copy that data and boot into a broken app causing sync to go crazy.
Ok this is much more a fringe case than I anticipated. Out of curiosity, what exactly was copied by this transfer process?
My guess is that only some settings were copied but no files?
On Android, obsidian stores files in the public “media” part, so I pretty sure that whatever you are using for automated transferring, those files are not seen as belonging to obsidian.
It seemed to copy things that weren’t markdown files. Like a couple PDFs and images that were part of my vault. The markdown files were missing.
Some settings copied like it clearly knew the sync encryption key and user and password but the sync plugin itself was disabled.
Def fringe issue. Just to note the thing that attempted to copy content between phones is just the built in setup of a new android phone so any mobile user who is using sync and buys a new phone will hit this.
It’s still the same as setting up another sync process. Maybe there should be a warning to remove device from sync before an automated new phone set up. Or even remove Obsidian beforehand.
So, if that’s what it is, there ought to be a clear procedure to deal with it to avoid it happening again to someone else.
tbh, I think sync ought to recognise it as a new device, and not try to reconnect as if it were the same device. Require a new sync (ie download) of all files.