Cant get Ignore to work.


(Robert Carter) #1

We have a large number of folders that we sync back to a central system in the following config: Remote system is Send only Central system is Send Receve

We have ignore patterns setup on the remote system but there are not being enforced and the ignored folders and files are being pushed to the central system.

I have followed the Syncthing documentation to a T and i cant get it to work as expected.

Example folder structure:

User Home Folder <- Root Sync Folder /appdata <- folder to not sync .tmp <= file type to not sync

Stignore on remote system: (?i)appdata (?i).tmp

I have also tried many other combinations of prefixes to make this work and they all seem to make no difference.

Any help would be appreciated.


#2

Your current ignore pattern

(?i)appdata
(?i).tmp

will ignore all items (files or folder) with the name appdata or .tmp. So a folder named appdata should not be synced. A more precise pattern would be (?i)/appdata.

To ignore all file ending in .tmp, the pattern should be (?i)*.tmp (I think).


(Robert Carter) #3

Yes but the folder named Appdata is still synced. And i did try it the way you showed it as well.


(Robert Carter) #4

Does anyone else have any suggestions since I cannot get this to work!?


(Audrius Butkevicius) #5

It should work and works for me. Do you have include pattern above that matches that?


#6

@RCcola1987 are you ignoring “Appdata,” “AppData” or “appdata?”

Check the case and make sure it matches.


(David) #7

Does your .stignore contain any patterns above the mentioned ones which match and include the AppData folder? Ignores work on a first-match basis so make sure to apply them in the right order.


(Robert Carter) #8

So i just checked a few of the .stignore’s and this is what we have in them.

(?i)/appdata (?i)*.tmp

But both .tmp files and the appdata folder itself is being synced. I noticed that one of the replies here showed a case sensitive appdata pattern. I’m assuming since windows filesystems are not case sensitive that should not matter but i did try one that was for Sh!ts and giggles and it still was synced.

I guess a question for clarification is what your are doing a one way sync AKA Send only to a remote system does both the “send only” system and the receiving system need to have the ignore patterns or just the “send only” system.


(Audrius Butkevicius) #9

One of them should be enough (the one you want to not receive it).

Ignores won’t delete data if its already there tho.


(Robert Carter) #10

I deleted the local data bet it got pushed down again. To clarify your last message I do not have to go Ignored on the send only machine and can just do it on the receiver?


(Audrius Butkevicius) #11

Yes, but the fact its not ignoring means either your pattern is not right or something else before the pattern includes it.


(Robert Carter) #12

The exact contents of the stignore are: (?i)/appdata (?i)*.tmp


(Audrius Butkevicius) #13

If its in one line, then it won’t work, it needs to be new line separated. Also try removing the leading slash.


(Robert Carter) #14

It is new line separated the text box on the forum condensed it to one line. Also i have tried it with and without the leading slash. Also have tried it as case sensitive and non case sensitive.


(David) #15

It looks very likely to me that you are missing something. Your ignore patterns are very common and work for a large number of users flawlessly. Consider setting up a separate test folder where you reproduce your configuration step by step, including ignore patterns and test files.


(Audrius Butkevicius) #16

Yeah, I was about to reply that this is generic case that is heavily covered by tests so there most be something magial about your setup.


(Robert Carter) #17

So i have over 20 computers with about 30 folders synced and all have the some issue.

I have found since day one that Syncthing has not played as nice with windows as it does linux but in this situation all systems are windows from win 7 to win 10. That only piece that is not windows is that Samba share where ALL received data is saved which is a Freenas box.

I’m at a loss. I will attempt to rebuild all of the folder pairs again but IDK if that will make any difference this time.


(Audrius Butkevicius) #18

Given it’s a samba share, perhaps you have two devices writing to the same location which is causing theae things to appear?


(David) #19

I wouldn’t rebuild everything at once but instead start with just one folder which is synced between two computers, just local storage and work up from there by adding one ignore, a few test files etc. This way, you should be able to determine the stage at which the error is introduced which should provide a much clearer picture about what’s going on.


#20

Case always matters with Syncthing since Syncthing is always case-sensitive.

@RCcola1987 Would you be willing to post your exact folder location and one more time the exact (case sensitive) name(s) of files and or folders you want to ignore?