What is the correct way of removing a machine from a syncthing net

In the past I think I have managed to get out of sync messages because I have removed a server from a network of syncthings, and some of the machines think that the removed machine has the latest copy of a number of files.

The only way I have found to then recover them is to touch them on another machine so they re-sync.

Is there a correct way of removing a machine from a syncthing network without this happening?

Yes, because nobody will ever be able to acquire the newest advertised version of the file.

Shouldn’t the index entries (and version vectors?) be cleaned from the local DB if the matching remote device is removed?

Or is this coming through an indirect connection? For example:

  • A updated the file, told B about it.
  • A is removed from B before getting the new version.
  • Then C gets informed by B about A’s latest version which is not even reachable anymore, but B won’t go back to advertising an older version, and C wouldn’t consider it newer anyway.

Global list is global list, it’s not tied to a device, it’s a union of all device advertised changes.

The fact that a device is removed does not mean that version is not available anywhere else, someone might have downloaded the file. Also, as you correctly pointed out, you could gain a version form a device you are not directly connected to via some other device.

That said, if a file is only available on some device that is deleted, that file is no longer marked as out of sync. The unavailable version is forgotten. And file metadata from other devices is not passed on - only file metadata for files that are actually successfully downloaded. I’m not sure what the real problem here is.

The global list is per linked device and if you remove a device, it does get removed from the global list. This sounds like you “removed” a device by just uninstalling Syncthing on that device. From the point of view of everyone else it’s just disconnected. If you actually remove it on all devices where it was connected, you’d not get “device missing” out of sync messages

Sorry if I have caused some confusion / discussion here. At the moment I don’t have a problem at the moment. I have had problems with the database getting out of sync in the past when I have deleted a machine so I was asking what is the “Approved” method of deleting a machine:

  • Make sure there are no introducers
  • Remove the machine from all of its peers
  • Remove syncthing from the machine tht I want to remove

Is this safe? Or is there a better way?

@imsodin - Yes I think you are correct. I probably did just re-install a different version of Syncthing without removing it from the other machines first. It therefore had a different GUID and the old machine was deemed disconnected. I then deleted the disconnected machine AFTER upgrading.

So my suggested approach in my previous post should be good. Thanks for responding and thanks for the great software :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.