Obsidian Sync. Spontaneous deletion of pictures

@WhiteNoise I did everything you wrote here - Obsidian Sync. Spontaneous deletion of attached files - #2 by WhiteNoise

Everything seemed fine for a few days, the last thing I turned on in the sync settings was to sync audio, video, pdf. Today again a huge bunch of pictures (several hundreds) were deleted on the server when I came to work and started the work computer.

Why did Obsidian think that these files should be deleted (this version of the vault was more up date)? All these files were on my work computer - I didn’t delete them, just yesterday everything synced up without any problems.
Why does it delete ONLY pictures?

Today again I will create everything from scratch and in this one I will load just a few basic plugins from the server, i.e. I will not copy the plugins folders.

I’ll write back here in a few days If there is going to be deletion of pictures again.

So the images were on your home computer and your work computer, right?

Is there something outside obsidian that deletes these images on your work computer?
If so, when you open obsidian these detetion are pushed to the server (and that’s normal).

Also obsidian in safe mode and see if this happens.

No, no one works with this base but me.

Okay, I will work in safe mode

Yes, both computers had all these pictures

I am not convinced the problem is sync. If the files are deleted in your work computer this change should be picked up by sync and pushed to the remote vault (that’s normal).

So the question is, are these files deleted in your work computer?
Are they deleted by obsidian? Are they deleted by a plugin? Are they deleted by an external program?

Can you try something monitor your files?

Yes, I was thinking the same thing. I came up with the following - each time before I run the obsidian - I will completely copy the base to a different folder and then if the deletions are repeated - I will compare, with what was before.

I also thought that the VeraCrypt somehow changes the files, but this is unlikely.
Can you advise a better option than VeraCrypt? I will try it.
Cryptomator doesn’t work - synchronization crashes with it.

I don’t know. I have been a long time user of veracrypt myself and I never had issues. Are you using nested containers for plausible deniability and wrinting on both containers?

No, I don’t use nested containers. Only the standard container.
So then - the problem is probably not veracrypt. Ок

Also your sync long and version history should show which machine deleted the file.

The files were deleted on the home computer.

But I did not delete them myself. At this point, I’ve been migrating my OneNote database for a few months now and trying to set up my obsidian work. So I wouldn’t delete HUNDREDS of pictures after I migrated them. Something weird is going on…

There is a current session “Sync activity”:

Where can I see the logs for several days?

I found the source of the problem - it is Consistent attachments and links plugin. After it updates information of attached files in cache - it starts deleting these files on the server.

That’s what I did. Built everything again from scratch and completely synced ( upload) with the server. Once it synced, pressed the sync pause button. Then, immediately ran this plugin. After he updated information on all the attached files in the cache - I decided to check that will sync and what is not sync - I took off from pause and sync immediately began mass delete all pictures (many hundreds) from the server.

Console log and synchronization log I copied and saved separately - all files, for which the plugin updated the information in the cache, were deleted.

I am surprised you didn’t think of this plugin before embarking in debuging everything else.

That plugin, as far as I remember, will move/rename attachment files, which will be regarded as a deletion and a new creation in Sync. So you are probably seeing those files being touched. Might also need to keep in mind that the plugin requires you to perform some very specific configurations to work properly, as explained in their readme file.

Yes, It’s my bad.

I did not think that the plugin changes the information, from where the Obsidian Sync reads the same information. I will now be very much more cautious with plugins.

I wrote to the plugin developer (Dmitry) on this issue ( Обновление кеша ссылки - конфликтует с работой obsidian Sync · Issue #8 · derwish-pro/obsidian-consistent-attachments-and-links · GitHub). I have already talked to him on other issues. Therefore, I think, when he has time - he will explain the situation. As far as I can see, there is nothing in the settings that can cause this.

The plugin itself I really like and in Obsidian very much missing the functionality that has this plugin, for example - Move attachment with notes - #3 by davecan

1 Like

I also experienced an issue like this, although I haven’t installed the Consistent Attachments and Links Plugin.

The only issue I noticed is that the mobile app wasn’t syncing properly for me. It was giving me an error for a specific note, and it wasn’t clear what the reason was. I removed the note today, and the app synced for me.

I noticed the images being deleted during that sync. I was able to restore the files from Google Drive (I backup my vault to Drive). I also noticed that a series of images were also removed on the 24th of June, so the mobile sync issue could have been incidental.

1 Like