Sync renaming deletes my files in an unpredictable way

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:

  1. Install obsidian and connect to the same vault using sync on a couple of laptops and an iphone
  2. Insert a large directory of files - call it “Notes”
  3. Add some files to that directory
  4. Rename the directory to “notes”
  5. 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.


Additional information

Sync activity log: Obsidian sync activity log · GitHub

I actually was working on a file - in the middle of typing - and sync deleted the file while I was working on it.

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…

You know, I discovered this bug a week ago while reproeing something else.

The thing is that sync doesn’t have a “rename concept”. Rename means delete, and download new files somewhere else.

An issue arises with Case Insensitive but Case Aware file systems.
(“Notes” and “notes” are the same folder, on mac and windows)

There’s nothing here

Please attach the sync logs of both devices. I wanna make sure I understand what happens in your case.

It happened to me too, lately.

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.

It’s not the same issue, let’s not mix things.