.SyncIgnore is great but...


hohums

Recommended Posts

.SyncIgnore is a file where you can filter out files you don't want synced. However it seems that when I put files in here bittorrent decides to delete those files rather than leave them un-touched. That is unexpected. Is this a bug? Expected behavior? Am I using it wrong?

Cheers

Link to comment
Share on other sites

If it's intended purpose is to remove ignored files then it should have been named .SyncRemove .

No, its purpose isn't intended to delete files - just to ignore them when it comes to syncing!

I'm looking into trying to replicate this issue at the moment.... but my initial thoughts are that it may be due to the fact that the .SyncIgnore file itself doesn't sync between devices!

Therefore, if you've got two folders in sync, and you edit the .SyncIgnore file in one of them to start ignoring certain files, those files are then excluded from that folder's index - meaning that potentially other sync'd devices then no longer see these files, and so mistakenly assume they've been physically deleted from the original device...

...as I say, that's my initial assumption, but I'm going to have a go now at trying to replicate this, and I'll let you know what I find!

UPDATE: I can confirm that this does appear to be a bug, as I can replicate this issue. As I suspected, it appears to be due to the fact that the .SyncIgnore file itself doesn't sync between devices.

WORKAROUND: Until the SyncApp team are able to address/fix this issue, the work-around to ignore specific files from syncing is as follows:

1. Close SyncApp on all your devices where the folder in question syncs

2. Edit the .SyncIgnore file within the folder to add your custom ignore filter(s)

3. IMPORTANT: Do this for ALL the .SyncIgnore files for the corresponding folders on all your other devices where your folder syncs (i.e. the .SyncIgnore file for that folder on all your devices should be identical)

4. Start SyncApp again

Your folders should then correctly sync, ignoring (and not removing!) the files you've specified!

Link to comment
Share on other sites

Whoa, please DONT sync the ignore file. In this case "ignore" has two meanings.

1) Pretend I don't have the file because it's local only; eg a temp file or an object (ignore "*~", "*.bak", "*.o" )

2) Pretend I do have the file because I don't want it; eg it's too big or just boring (ignore *.iso, *.bak, *.sh)

The first one needs the local files to be completely untouched.

The second one needs the ignore files to be independent.

Perhaps it'd be better to think of this as a sort of redirect; instead of being stored on the disk the file is stored in a black box somewhere. Say a fake disk with no free space.

PS: The swams are likely to be small, If I have a cloud node with only a little bit of disk space that's ignoring most (all) files will it be able to act as a relay for those files ? Should it be able to act as a relay or would it be sufficient to use say the Teredo relays ?

Link to comment
Share on other sites

Whoa, please DONT sync the ignore file. In this case "ignore" has two meanings.

I'm not sure I quite follow? What's wrong with having the .SyncIgnore file on BOTH devices being identical and ignoring, in your case, "*~", "*.bak", "*.o" "*.iso", and "*.sh"?? ...that way, none of those files will sync between devices.... which is what you want, right? :unsure:

Link to comment
Share on other sites

The case, if I understood it correctly, is that you put something inside .SyncIgnore on ONE computer, but don't upadte it on second one. Then file is deleted on second computer.

For now this is how .SyncIgnore will work. We do agree that this is not a convenient way to do things and we will improve it sometime.

Instructions

1. Shutdown SyncApp on all computers;

2. Put new entry in .SyncIgnore, make sure it is the same on all devices;

3. Start SyncApp

Details

.SyncIgnore makes file invisible for SyncApp. If file was indexed and transferred to other computer, then SyncApp treats this case as file was deleted by some means, and delete file from other peers.

Some more technical details to understand the case. SyncApp makes sure that file tree is the same across devices, in this case one computer reports that it has a file, and another says it doesn't have it (it is in .SyncIgnore). SyncApp can't have separate file tree across devices, so there are two options: delete file, or get it from the peer. Both actions are undesired, so having similar .SyncIgnore across devices is the only right way.

Link to comment
Share on other sites

We do agree that this is not a convenient way to do things and we will improve it sometime.

... so having similar .SyncIgnore across devices is the only right way.

So why not just have SyncApp sync .SyncIgnore files, so that when you make changes to a folder's .SyncIgnore file, those changes propagate to the corresponding sync'd folders on other devices? ...would that not solve the problem/avoid the need to manually make changes to the .SyncIgnore file on each device?

Link to comment
Share on other sites

I'm not sure I quite follow? What's wrong with having the .SyncIgnore file on BOTH devices being identical and ignoring, in your case, "*~", "*.bak", "*.o" "*.iso", and "*.sh"?? ...that way, none of those files will sync between devices.... which is what you want, right? :unsure:

Okay, here's the full use case:

Think about THREE machines not just two.

I want most of the files to go to all three machines.

It's a directory containing source code so I don't want the object files to sync because the machines have different processors so the .o files are incompatible.

Some of the files are a test suite with some huge test files, this isn't required on one of the machines (and wouldn't fit anyway as it's a little NAS box) so I don't want them on that machine. But I still want them on all of the others.

Now I setup the ignore files, the *.o files are easy.

The test suite has to be ignored on ONLY the NAS box.

Oh, it looks like the Windows box uses *.obj not *.o so it would be reasonable to ignore those on just that one.

You see it now ?

Link to comment
Share on other sites

Some more technical details to understand the case. SyncApp makes sure that file tree is the same across devices, in this case one computer reports that it has a file, and another says it doesn't have it (it is in .SyncIgnore). SyncApp can't have separate file tree across devices, so there are two options: delete file, or get it from the peer. Both actions are undesired, so having similar .SyncIgnore across devices is the only right way.

This is why I said it might be better to consider it as a redirect.

So if a file "thefile" exists in .SyncIgnore it's redirected to be stored into ".ignored/thefile" as far as the shared tree is concerned nothing changes but if this node downloads a file it'd store it in the .ignored directory not the original location. Of course as it is being ignored we don't actually want to download it, but under this view of the world that is just an optimisation. (eg: We'll download it tomorrow)

When a file is added to the .SyncIgnore it would not be added as a local delete but as a remote create, that way the shared file doesn't get deleted.

Link to comment
Share on other sites

From my understanding, we need an option for ignoring files that we are receiving and an option for ignoring files that we are sending.

Great!

Suggestions:

- .SyncIgnore file which will be not synced along devices.

- .SyncIgnoreGlobal file which will be synced.

- .SyncControl file which can explain sync which files will be on-way synced (for example only get them and ignore local modifications or only send them and ignore remote modifications)

Link to comment
Share on other sites

What about if you put .SyncIgnore in the .SyncIgnore file then it won't sync it. I guess that kinda limits you from having both sorts of ignore syncs occurring at once.

Anyway for my purposes I don't want to be updating every computer everytime I or someone else adds a new ignore term... it is just to complicated. I might not even have access to all the machines.

Link to comment
Share on other sites

  • 2 weeks later...

So spent some time doing testing...

Can't seem to figure out how quickly it checks/refreshes from the .SyncIgnore file but restarting the app may have helped.

This is what I was able to find:


abc # Ignores ALL dirs
/abc # Ignores ONLY root
/*/abc # Ignores ALL EXCEPT root
/*/*/abc # Ignores ALL AFTER 2 dir levels
/*/*/*/abc # Ignores ALL AFTER 3 dir levels

/**/abc # Ignores ALL EXCEPT root
*/abc # Ignores ALL EXCEPT root
**/abc # Ignores ALL EXCEPT root
.* # Ignores ALL HIDDEN files & dirs
abc.ext # Ignores ALL files of type .ext
abc.* # Ignores ALL files named of ANY type
abc* # Ignores ALL files & dirs begining with "abc"

# FiLeS seem to be CaSe sensitive
*xyz/abc.ext # Ignores ALL "abc.ext" files in ANY "xyz" dir
*xyz/*abc*.* # Ignores ALL files containing "abc" in any "xyz" dir
*xyz/*abc* # Ignores ALL files & dirs containing "abc" in any "xyz" dir

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Indeed, I see a bug here:

  • having 3 peers sharing some folders
  • have one folder that is shared only by 2 peers - .syncignore filters are identical on those two peers
  • as in the other error scenarios, files that should be hidden by the .syncignore filters start disappearing, as soon as all 3 peers are online

It seems to me, that having the folder not mapped on the third peer is similar to not having the filter in the .syncignore. If this is true, then the use of .syncignore would be limited to scenarios, where all folders are always mapped to all peers.

Please advise, if I´m doing something wrong. I´d be more than happy, if this would be a user error.

Link to comment
Share on other sites

I have to correct myself a bit or at least to get more specific: The problem also seems to be more related to folders.

The above scenario works well with a file filter pattern ("*.pst"). But if I want to exclude a folder ("Outlook"), that the delete problem arisis. I do filter a folder in another scenario sucessfully, where I´m mapping the folder on all of my devices.

Still a bit misterious...

Link to comment
Share on other sites

  • 5 months later...

We need specific examples about .SynIgnore

 

For example:

 

I'm sharing my root folder

E:\Sync

 

There are 4 folders in it

E:\Sync\Folder 1

E:\Sync\Folder 2

 

I want to ignore only Folder 2 and keep others

 

So I write exactly

E:\Sync\Folder 2 in .SyncIgnore file and save as UTF. And put this file in the E:Sync root. Is it correct?

Link to comment
Share on other sites

  • 1 month later...

Hey,

I am sorry but am kinda new to bit torrent sync, and cloud sharing dev as such.

 

I am kinda confused with regard to syncing files/folders, and use .SyncIgnore to make syncing faster when there are many folders, and to ignore syncing some folders.

 

What has me confused is: "Make sure that .SyncIgnore folder is same for all the clients where the folder is being synced". 

Confusion: "Doesn't this limit the use case to one user using these multiple devices, and these devices being accessible to the single user, because he needs to manually make these changes right?"

 

From just the term "SyncIgnore" and the way one would like to have it would be: "Make changes in the .SyncIgnore folder on one device (acting as host) to ignore most of the folders/files, and sync only one folder which is to be synced to the other device (kinda selective sync)".

 

 

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.

Guest
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.