My DEST VM files and folders aren't upgraded with the files and folders I modify on the SOURCE VM with Syncthing.

Hello to everyone.

I’m trying to configure correctly Syncthing because I want to synchronize my two Ubuntus 21.10 virtual machines. What I want to do is to send automatically every change I made to files and folders present on the virtual machine called “Z390-AORUS-PRO-SOURCE” with IP : 192.168.1.4 to the other virtual machine connected to my LAN network called “Z390-AORUS-PRO-DEST” with IP : 192.168.1.5. That’s because I use more often the SOURCE VM than the DEST VM. For this reason,on the SOURCE VM I’ve configured Syncthing to “send only” the changes and the DEST VM to “receive only”. I would like to synchronize every file and folder present on SOURCE to DEST,starting from its ROOT,but for the moment,to make things easier,I’m trying to share only the folder “/home/ziomario” ; so. Every change I made inside that folder and inside every folder inside it should be reflected on the same folder of the DEST VM. My problem is that files and folders of the DEST VM are always the same. They are never updated even if I have tried to configure the Syncthing parameters in different ways. I’ve saved some relevant pictures of the configuration of the SOURCE VM and of the DEST VM and I’ve saved them on my google drive. If you want give a look,to understand where could be the error,you will make me very happy.

You have local modifications on the receive only side.

Receive only doesn’t mean “I will overwrite whatever I have with what is sent to me”, it means “I will not send my local changes out”, and you have local changes.

The behaviour when you have local changes is to preserve them, unless you press the override button, which then replaces local changes with changes from the remote devices.

No, there is no way of doing this automatically, as its an incredibly destructive action.

what’s the solution if I want that the dest VM have the same files and folders of the source ? should I put “send and receive” on the Syncthing that I run on the DEST vm ?

Normally setting both to the default “Send & Receive” is enough. “Receive Only” is there just in case you want to be extra sure that nothing local ever gets pushed to other devices. The same applies to “Send Only”, just the other way round.

ok. I’ve configured both,source and dest as send and receive. But I see that the remote devices are still disconnected.

Not being able to connect is usually caused by firewalls and such. Also, have you by any chance touched any of the default settings related to relays, discovery, etc.?

The solution is to take away permissions on the destination machine from everyone, except the user running syncthing, to make sure no application modifies files.

You can still end up in the exactly same situation you are in now if other applications modify the files.

There is no “I don’t care, just always overwrite” mode.

In both source and dest there is one only user,ziomario,so it’s the only one that can run Syncthing.

That doesn’t change what I’m suggesting.

What’s happening is that something (or someone) is modifying files on the receive side, which is what is causing this.

Now they are synchronizing files. I will let you know what will happen when the process will be concluded.

It’s working. it has syncronized the folder /home/ziomario. In that folder now there are the same files for both the disks. Good. What if I want to syncronize every file on the source and on the dest disk ? Can I share the folder / in both the disks ? Can u tell me what are the folders that I should ignore to prevent collisions ? If there are. thanks.

Syncing / is definitely a terrible idea. Not only is Syncthing not designed to be run as root (which is required for many of those files), but it will also try to pick up its own database and log file, which will definitely lead to trouble. Don’t do that.

It’s intended for “content” folders below your home directory, as the most common use-case.

Point is that from time to time I need to do a massive upgrade of Ubuntu and I can’t do it booting it physically. I don’t know which files and folder will be modified. My idea is to upgrade the VM (I can use it because it does not require to reboot the machine) and then sync the changed files with the physical installation (that I can boot because I’ve declared the physical disk in another VM). Is there a way to do this ?

This sounds completely utterly crazy.

You can’t just expect to sync root drive from another machine and expect to “upgrade your OS” that way … Especially without rebooting.

This is not how operating systems work. It’s not just a collection of files, there are hardware specific parts, machine specific logs, parts that are loaded into memory on boot and never again, that has to have some matching collection of files on the filesystem.

It also modifies those files, which in this context means that you will constantly have a prompt saying things are out of sync etc.

If you do this, I am almost certain you will end up corrupting your OS and end up with a non-bootable system.

2 Likes

No problem. I will not do it. Now,can you give a look at the problem that I’m facing today ? yesterday I’ve synchronized the two virtual machines that you know,but Syncthing can’t start anymore :

[start] 16:42:02 INFO: syncthing v1.12.1-ds1 "Fermium Flea" (go1.16.5 linux-amd64) debian@debian 2021-07-23 20:27:51 UTC

[start] 16:42:02 INFO: Using large-database tuning

[TZVTR] 16:42:02 INFO: My ID: TZVTRI2

[TZVTR] 16:42:03 INFO: Single thread SHA256 performance is 593 MB/s using minio/sha256-simd (496 MB/s using crypto/sha256).

[TZVTR] 16:42:03 INFO: Hashing performance is 494.52 MB/s

[TZVTR] 16:42:03 INFO: Starting deadlock detector with 20m0s timeout

[TZVTR] 16:42:03 INFO: Overall send rate is unlimited, receive rate is unlimited

[TZVTR] 16:42:03 INFO: Using discovery mechanism: global discovery server [https://discovery.syncthing.net/v2/?noannounce...](https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW)

[TZVTR] 16:42:03 INFO: Using discovery mechanism: global discovery server [https://discovery-v4.syncthing.net/v2/?nolookup...](https://l.facebook.com/l.php?u=https%3A%2F%2Fdiscovery-v4.syncthing.net%2Fv2%2F%3Fnolookup%26id%3DLYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW&h=AT3Hgy34E7DN9bwr-8K-cwp0Q0sHp0DBmCZIt7hCOHi0pnHJ4xiU-c0d1aUa8mNFRdQkVfYiN09Ubw-ytUb9vpnyTamwDrooxp_i9rFvUp9lHq0aZH2OInZDV_HY&h=AT3Hgy34E7DN9bwr-8K-cwp0Q0sHp0DBmCZIt7hCOHi0pnHJ4xiU-c0d1aUa8mNFRdQkVfYiN09Ubw-ytUb9vpnyTamwDrooxp_i9rFvUp9lHq0aZH2OInZDV_HY&h=AT3Hgy34E7DN9bwr-8K-cwp0Q0sHp0DBmCZIt7hCOHi0pnHJ4xiU-c0d1aUa8mNFRdQkVfYiN09Ubw-ytUb9vpnyTamwDrooxp_i9rFvUp9lHq0aZH2OInZDV_HY)

[TZVTR] 16:42:03 INFO: Using discovery mechanism: global discovery server [https://discovery-v6.syncthing.net/v2/?nolookup...](https://l.facebook.com/l.php?u=https%3A%2F%2Fdiscovery-v6.syncthing.net%2Fv2%2F%3Fnolookup%26id%3DLYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW&h=AT0fsO-awwuidLoFDR3C2GesevXzkJwSnNx_Q8P_Pm5t5lx8N0-duVgeC6FA4SkJR4BXr4YvlSpf5Xdh4aLyVVRprhxUsFweBI6YG3nkA_NSQrobE0qQ4Uktd_UO&h=AT0fsO-awwuidLoFDR3C2GesevXzkJwSnNx_Q8P_Pm5t5lx8N0-duVgeC6FA4SkJR4BXr4YvlSpf5Xdh4aLyVVRprhxUsFweBI6YG3nkA_NSQrobE0qQ4Uktd_UO&h=AT0fsO-awwuidLoFDR3C2GesevXzkJwSnNx_Q8P_Pm5t5lx8N0-duVgeC6FA4SkJR4BXr4YvlSpf5Xdh4aLyVVRprhxUsFweBI6YG3nkA_NSQrobE0qQ4Uktd_UO)

2022/03/11 16:42:03 connection doesn't allow setting of receive buffer size. See [https://github.com/.../quic-go/wiki/UDP-Receive-Buffer-Size](https://l.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Flucas-clemente%2Fquic-go%2Fwiki%2FUDP-Receive-Buffer-Size&h=AT2USlfSbRDkzUhRr2zO6QbFdzfwhFX5WIpHd_3SD_h6as3z7L4nFUCt8XaqiDUzdFgMnM4McCRLKAtfSuTzk-LT-GmfnNVHxQtdTa5NBAQ_SPScOzEmIo3KG_Rp&h=AT2USlfSbRDkzUhRr2zO6QbFdzfwhFX5WIpHd_3SD_h6as3z7L4nFUCt8XaqiDUzdFgMnM4McCRLKAtfSuTzk-LT-GmfnNVHxQtdTa5NBAQ_SPScOzEmIo3KG_Rp&h=AT2USlfSbRDkzUhRr2zO6QbFdzfwhFX5WIpHd_3SD_h6as3z7L4nFUCt8XaqiDUzdFgMnM4McCRLKAtfSuTzk-LT-GmfnNVHxQtdTa5NBAQ_SPScOzEmIo3KG_Rp) for details.

[TZVTR] 16:42:03 INFO: Using discovery mechanism: IPv4 local broadcast discovery on port 21027

[TZVTR] 16:42:03 INFO: Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027

[TZVTR] 16:42:03 INFO: QUIC listener ([::]:22000) starting

[TZVTR] 16:42:03 INFO: TCP listener ([::]:22000) starting

[TZVTR] 16:42:03 INFO: Relay listener (dynamic+[https://relays.syncthing.net/endpoint](https://l.facebook.com/l.php?u=https%3A%2F%2Frelays.syncthing.net%2Fendpoint&h=AT0wlSZZyMWAeuLoz-KR8Ph-3-O7ZVAxkBl00-lIpxZpuHpMmLnU3rdb_L9H_f92EVAU9kr-9EmBwkCHfDqajMfFVanaqosmlBBSpClleItXsOHd7zm0rw4QsAiu&h=AT0wlSZZyMWAeuLoz-KR8Ph-3-O7ZVAxkBl00-lIpxZpuHpMmLnU3rdb_L9H_f92EVAU9kr-9EmBwkCHfDqajMfFVanaqosmlBBSpClleItXsOHd7zm0rw4QsAiu&h=AT0wlSZZyMWAeuLoz-KR8Ph-3-O7ZVAxkBl00-lIpxZpuHpMmLnU3rdb_L9H_f92EVAU9kr-9EmBwkCHfDqajMfFVanaqosmlBBSpClleItXsOHd7zm0rw4QsAiu)) starting

[TZVTR] 16:42:03 WARNING: Starting API/GUI: listen tcp 192.168.1.4:8384: bind: cannot assign requested address

[TZVTR] 16:42:03 WARNING: Starting API/GUI: listen tcp 192.168.1.4:8384: bind: cannot assign requested address

[TZVTR] 16:42:03 WARNING: Failed starting API: listen tcp 192.168.1.4:8384: bind: cannot assign requested address

[TZVTR] 16:42:03 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down

[TZVTR] 16:42:03 INFO: QUIC listener ([::]:22000) shutting down

[TZVTR] 16:42:03 WARNING: Starting API/GUI: listen tcp 192.168.1.4:8384: bind: cannot assign requested address

[TZVTR] 16:42:03 INFO: Detected 0 NAT services

[TZVTR] 16:42:03 WARNING: Some protected files may be overwritten and cause issues. See [https://docs.syncthing.net/users/config.html...](https://docs.syncthing.net/users/config.html) for more information. The at risk files are: /home/ziomario/.config/syncthing/index-v0.14.0.db, /home/ziomario/.config/syncthing/config.xml, /home/ziomario/.config/syncthing/cert.pem, /home/ziomario/.config/syncthing/key.pem

[TZVTR] 16:42:03 INFO: Ready to synchronize "ziomario-SOURCE" (2vmnq-ytqn4) (sendreceive)

[TZVTR] 16:42:03 INFO: UPnP parse: dial tcp 192.168.1.1:49152: operation was canceled

[TZVTR] 16:42:03 WARNING: Some protected files may be overwritten and cause issues. See [https://docs.syncthing.net/users/config.html...](https://docs.syncthing.net/users/config.html) for more information. The at risk files are: /home/ziomario/.config/syncthing/index-v0.14.0.db, /home/ziomario/.config/syncthing/config.xml, /home/ziomario/.config/syncthing/cert.pem, /home/ziomario/.config/syncthing/key.pem

[TZVTR] 16:42:03 INFO: Ready to synchronize "ziomario-DEST" (ozzsb-inews) (sendreceive)

[TZVTR] 16:42:04 INFO: TCP listener ([::]:22000) shutting down

[TZVTR] 16:42:04 INFO: Exiting

[monitor] 16:42:04 INFO: Syncthing exited: exit status 1

Other than:

  1. Being quite an old version
  2. Syncing syncthings own database (this will cause premanent out of sync, or worse, corruption)
  3. All urls for some reason being routed via facebook in your log

There are no errors.

Seems like its the service manager asking Syncthing to stop gracefully.

Which solutions to make it work again ?

Uninstall the version you have now, install by following: https://apt.syncthing.net/ amd make sure to ignore .config/Syncthing/ (depending on where your folder root is)

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