Sync and SMB files ahres - status quo?

Recommended Posts

Hello there, after Nextcloud annoyed me and Synology Drive let me down - I set up Resilio Sync, and so far I am happy (couple of folders disappeared, but might be my poor setup ūüėČ ) - anyway before purchasing a pro license, I went through the help center, and stumbed upon this:

To be honest, I do not really know what to think now.


The vast majority of Samba simple setups cannot handle well the following setup: If any 3rd party application accesses files shared by Samba in some other way (for example, directly if app runs on the same OS where Samba daemon does), file may be damaged, or changes made by a 3rd party application may be rolled back.

This affects one of the most favorite Sync users' setups: syncing data between 2-3 NASes with Sync, while letting other users access it with SMB. This setup may lead to files getting lost or corrupted, as in this case when Sync is installed on a NAS and accesses files outside of SMB protocol.

So apparently the most favorite Setup is not supported, and there is also no guideline / best practise of what to do... Appart from that I find the language no to clear. E.g. "if app runs on the same OS where Samba daemon does" - so trying to pin this down: So e.g. "CloudSync" syncing some data from a SAMBA share to e.g. OneDrive would interfere with Resilio Sync and could lead to lost or corrpupted data? Or Plex media server running a scan every morning, same risk? In the end of the day, this leads to Resilio de facto not being usable on Synology NAS? Or any connected folder must exclusively be used by Resilio sync... ?

Bit confused, maybe someone can shed some light please... many thanks in advance

Link to comment
Share on other sites

  • 2 weeks later...

Any News to this? I am also suprised to read this?

And in my usecase the more interesting question:

does this behavior also affect sharing Volumes over Network via mac OS SMB Sharing?

This would mean that you can't sync two macs via the mac OS file-sharing option correctly?!??

Link to comment
Share on other sites

Since there's no answer from the official staffs, I'll give my thoughts.


So apparently the most favorite Setup is not supported

I didn't see anything the official FAQ said it's unsupported. The FAQ only states there're some limitations, and in some extreme cases in you might lose some version your file. To be honest, if you have any 2 servers that may modify the same file at the same time, there's a potential that you may lose (or corrupt) some version of that file. Samba server itself is not a file synchronizer, it just writes files without checking timestamps, version, etc., to make it evn worse, samba servers <3.0 don't send notifications, if it constantly interferes files that Resilio Sync tries to sync, you should be prepared that sooner or later Samba server and Resilio Sync may over-write each other's changes.

This scenario could happen even with a normal user's activity (although it's very unlikely). Here's an example: 

let's say, there are 2 RSL clients (on PC1 and PC2) that trying to sync filea, a user is also working on fillea at PC1.

. both PC1 and PC2 have filea synchronized at version 1.0

. at PC1, the user opens filea (version 1.0) and starts working on it

. on PC2, filea gets updated to version 2.0

. on PC1, RSL starts synchronizing filea by downloading version 2.0 into its temporary directory / cache

. on PC1, RSL finishes downloading filea version 2.0, verifies the downloaded file data, and gets ready to copy version 2.0 from its temporary directory/cache to filea's real location (currently it's version 1.0)

. at this exact moment, the user (on PC1) changes filea and writes it as version 1.1, and somehow the file change notification gets lost (like samba server <3.0) so RSL lost track of version 1.1.

. on PC1, RSL starts copy version 2.0 to filea's real location, resulting in overwriting user's version (1.1) with version 2.0.

As you can see, the user's filea version 1.1 gets lost.

I can hardly say it's RSL's fault, I would say it could happen with any synchronizer software, including Dropbox, OneDrive, etc. The point is, for synchronizer software to work perfectly, you should minimize interferences as much as you can.

Back to your samba issue, there could be some solutions:

1. make the samba share read-only to its users, so the samba server does not change files 

2. or, keep RSL stop synchronizing changes when the samba server is online; take the samba server offline before you start synchronizing (RSL), then, after you finish synchronizing (RSL) and stop synchronizing again, take the samba server back online.

3. or, just run RSL and samba server normally, and keep in mind that you may get some files lost (or corrupted) but the chance is very slim, especially if your samba server and RSL are not super busy.

If you really concern about this situation, your best (and, probably, only) solution is: just don't sync your samba share folders with RSL (as well as other software such as Dropbox). Personally, I never found a case that I need to run Samba server and RSL for the same directories at the same time. 


Link to comment
Share on other sites

@eltopo Thank you very much for your comprehensive and enlighting answer - highly appreciated. Its a shame there is no like button ūüôā

To recap what you said, to make sure I understood correctly: What you are saiyng is, that it is more of a hypothetical risk, thank a real one, with a low probability, and given the pure nature that the same file cannot be edited simulataneously. Having said this, in a home user scenario the risk of a backup job / sync job of lets say HyperBackup and RSL colliding is also really low?



Link to comment
Share on other sites

@brucie I think it depends on how busy your smb server is. If it's only for your family's lan users and they access the smb files occasionally, I would say the probability of problems is low, along with other backup plans, it would be OK for me.

I recommend that you do your test with RSL+smbd before you make any decisions.

Note that I never use RSL as a backup solution, it's just a file synchronizer without version control. Obviously that's my understanding, and other people DO use RSL to back up data. So, it's more a personal choice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.