We strongly recommend you to search the forum with possible keywords before submitting a new bug report. Please also try your repro steps with third-party plugins and custom CSS disabled and see if it’s still reproducible. If it’s an issue with third-party plugins or themes, try contacting the author for help. Once you’ve done the above, delete this line.
Steps to reproduce
I’m not sure what the steps to reproduce are exactly, but it’s something along these lines:
Install obsidian and connect to the same vault using sync on a couple of laptops and an iphone
Insert a large directory of files - call it “Notes”
Add some files to that directory
Rename the directory to “notes”
Add some files to the “notes” directory
Expected result
Obisidian continues to show all the files created in “Notes” or “notes” under the “notes” directory.
Actual result
Obsidian sync renamed “Notes” back to “notes” and many of the files I had created in “notes” were deleted. I have my obsidian directory under source control on one of my computers, otherwise I might not have noticed as the files disappeared after the rename.
There are also some directories that Obisidian repeatedly deletes even though I keep adding them back. I’m trying to do a bulk restore now, but there’s a huge list of files - some legitimately deleted due to the rename and some illegitimately deleted, so I’m having to sift through them all. Also, the steps to repro above are mostly conjecture. I don’t think that’s exactly what happened, especially since even after Obsidian sync reversed the “Notes” → “notes” rename, it continues to delete some of the files in the “Notes” directory seemingly at random.
Environment
Operating system: macOS monterey 12.4 and 12.6
Debug info:
SYSTEM INFO:
Obsidian version: v1.0.3
Installer version: v0.15.9
Operating system: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 21.5.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 3
Plugins enabled: 3
1: Tasks v1.16.0
2: Toggl Track v0.9.0
3: Obsidian42 - Text Transporter v1.0.3
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
SYSTEM INFO:
Obsidian version: v1.0.3
Installer version: v1.0.0
Operating system: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 21.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 5
Plugins enabled: 5
1: Tasks v1.16.0
2: Toggl Track v0.9.0
3: Jira Issue v1.31.0
4: Obsidian42 - Text Transporter v1.0.3
5: Obsidian Graphviz v1.0.4
RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
I have some more info here. After doing a bulk restore on one of my computers - restoring a bunch of files into the “Notes” directory - I opened up Obsidian on my other computer. Once it had re-synced those files that I restored show up on my other computer in a “reference” directory. I moved all the files from my “reference” directory into the “Notes” directory a week or two ago and deleted the “reference” directory…
I just cannot trust that Obsidian Sync is going to do the right thing… It has repeatedly deleted my data. I think I’ll have to rely on git to sync between my two computers (so turn it off entirely on one of my computers) and then just use Sync to sync things to my phone and hope that I don’t have the same problems with my phone…
My ‘OG 2)’ file was renamed to ‘Og 2)’ on my iPad. No probs in Obsidian from what I’ve seen but when you go to GitHub Desktop, it doesn’t even let you pull your changes until you manually delete ‘OG 2)’ (as the earlier version in your PC folder is still named like that). Then it will pull down the changes (along with the renamed ‘Og 2)’ file) okay.
Yes, it’s the same in Git, the files are not renamed (as people think) but deleted and a new file with the given name is created.
Generally, any renames are touchy-touchy. Or at least this is what I am trying to remind myself of.
Creating a note by specifying a link and clicking on it (e.g. [[obsidian/new folder/new note]] performs the expected behavior and appears to create both the new folder and the note within it. You can then add content to this note and the note will persist. However, when I then open obsidian on another device (which shares the vault via obsidian sync), the device invisibly deletes this note and the folder it resides in. This is mitigated by manually creating the folder first.
Expected result
It seems consistent with the overall UX that creating a new note in a new folder via the specification of a link and following the link should work. The note and folder should persist through syncing.
If this is not intended to work, it should not appear to work and then result in notes being deleted later…
Actual result
Notes and folders are deleted without warning to the user. When the user subsequently attempts to find the note either by following the link or by browsing, they are not present.
(content can, however, be recovered by using obsidian sync’s recovery feature.)
Environment
Operating system: Windows 10 and IOS.
Debug info:
SYSTEM INFO:
Obsidian version: v1.1.9
Installer version: v0.15.9
Operating system: Windows 10 Pro 10.0.19044
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Things
Snippets enabled: 0
Restricted mode: off
Plugins installed: 7
Plugins enabled: 6
1: Calendar v1.5.10
2: Citations v0.4.5
3: Periodic Notes v0.0.17
4: Dataview v0.5.55
5: Tasks v1.24.0
6: Omnisearch v1.11.1
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
As case-intensive but unaware filesystems are the norm for many users, can we come up with a solution for this? Notes being deleted without warning is a seriously bad behavior as it degrades trust in the system, especially since it is part of the paid sync feature. I really like sync, but this makes me rethink paying and instead consider switching to an alternative solution.
I don’t know much about your development practices here, but it seems like a first pass bandage would be to simply ask/notify when this happens?
It also seems relatively straightforward to repair by making some choices about desired behavior regarding case in folder names or a sync rename concept? Why is sync deleting the old version but not redownloading the new one?
IMHO, a sync rename concept might be worth implementing as it can save significantly on the extent of data transfer in cases of large directories or files and will make logs and related things much cleaner.
Although I am no programmer, I think the filesystem issues don’t lie with Obsidian per se. As I mentioned further up, I run into similar problems with Git service as well. But because I have file versioning, I am comfortable deleting a file so I can pull from the remote the new file with changed case (Git doesn’t budge unless I delete the file).