geonrd Posted May 1, 2013 Report Share Posted May 1, 2013 Please help me understand what I'm doing wrong. I've got a folder E:\Projects that I'd like to sync between 2 computers. I have 3 subfolders I'd like to have ignored (folder1, folder2, and the secific subfolders inside of them)In windows 7, I open notepad++ and change encoding to UTF-8. Save the file as .SyncIgnore in E:\Projects. I then add 3 lines to .syncignore file:\folder1\sf1\folder1\sf2\folder2\sf1I save this, then start Sync application. I generate a key, and add E:\Projects to shared folders. When I look in the History tab, I see that files from the ignored paths are being added.Would appreciate any help.Thanks. Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted May 1, 2013 Report Share Posted May 1, 2013 "\folder1\sf1" for example won't ignore everything in "folder1"... it will only ignore files/folders within the "sf1" sub directory of "folder1". Any other files/folders within "folder1" itself won't be ignored (excluded) from the sync. To exclude the entire contents of "folder1" (including all its sub directories), consider using the "*" wildcard.There are some .SyncIgnore examples, including how to use wildcards, in the unofficial FAQDon't forget as well that your .SyncIgnore files need to be identical at all the locations you're syncing your "projects" folder to. Quote Link to comment Share on other sites More sharing options...
geonrd Posted May 1, 2013 Author Report Share Posted May 1, 2013 GreatMarko, thanks.I did want to sync some of folder1, just not the large folders. I've tried doing as you said, and the folders are still being indexed and synchronized. Are the paths in the .syncignore file supposed to be relative? Does it matter if the slashes are front or backward? Seems I've tried all variations of these and the folders I'd like to ignore keep syncing.I've tried:E:\Projects\folder1\sf1E:/Projects/folder1/sf1E:\Projects\folder1\sf1\*E:\Projects\folder1\sf1\*.*\folder1\sf1\\folder1\sf1\*None of these seem to be working for me. Once I've tried them, and see that the unwanted folders are still syncing, I remove the folder from btsync and close the program. Then I would try a different variation and restart btsync.The .syncignore file is supposed to be at the root of the folder I'm sharing, correct? (E:\Projects). Seems like I'm missing something very simple here. Quote Link to comment Share on other sites More sharing options...
yottabit Posted May 1, 2013 Report Share Posted May 1, 2013 I've been playing around with .SyncIgnore and have noticed the following things:If you specify a wildcard, .e.g., file*, everything matching that--including in all subdirectories--is ignored.If you add a file/dir to .SyncIgnore after it has already sync'd, it will be removed from other peers (actually just placed in their .SyncTrash directories).I have also just tried a number of different permutations of a subdirectory in an attempt to get BTSync to ignore but it doesn't seem to work on directories--only on files (and even this seems hit-and-miss when adding file masks to files that have already sync'd)...You may have to close the .SyncIgnore file when you're done editing it (not just save).Then, I exited BTSync on the host of the files (readonly secret, remember), and restarted BTSync ... all of a sudden it deleted on the peer all of the subdirectories I had specified in .SyncIgore (well, moved to .SyncTrash of course). It also deleted a filemask I had specified after the file had already sync'd (although earlier in the test this worked without restarting BTSync).So I guess the lesson for now is just to restart BTSync when you update .SyncIgnore. I would think only restarting BTSync on the host with the changed .SyncIgnore is enough (at least it was in my case, and restarting the read-only peer didn't have any effect).To ignore a subdir I simply specified it like:subdirOr a file within:subdir/fileNothing special. I used "/" in the UNIX-compatible syntax even though it was on Windows. I tried relative and absolute paths (including drive letter) and it didn't work until restarting BTSync. And when I restarted BTSync and saw the changes take effect, I was only using relative paths.I also upgraded the host to build 125 and didn't see any difference in this behavior.I was using Win7 as both the source and the read-only peer for these tests.I observed changes tended to replicate within about 5 seconds on my LAN.Hope this helps a bit! Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted May 1, 2013 Report Share Posted May 1, 2013 If you specify a wildcard, .e.g., file*, everything matching that--including in all subdirectories--is ignored.This is correct behavior.If you add a file/dir to .SyncIgnore after it has already sync'd, it will be removed from other peers (actually just placed in their .SyncTrash directories).This is why you should make changes to .SyncIgnore when BitTorrent Sync ISN'T running, and also ensure that the corresponding .SyncIgnore files on your other devices are identical before restarting BitTorrent Sync on all your devicesYou may have to close the .SyncIgnore file when you're done editing it (not just save).It's more a case of making sure you restart BitTorrent Sync after making any changes to SyncIgnoreThere's more information on how the steps to correctly modify .SyncIgnore files in this post Quote Link to comment Share on other sites More sharing options...
Xanza Posted May 1, 2013 Report Share Posted May 1, 2013 I've been playing around with .SyncIgnore and have noticed the following things:If you specify a wildcard, .e.g., file*, everything matching that--including in all subdirectories--is ignored.If you add a file/dir to .SyncIgnore after it has already sync'd, it will be removed from other peers (actually just placed in their .SyncTrash directories).I have also just tried a number of different permutations of a subdirectory in an attempt to get BTSync to ignore but it doesn't seem to work on directories--only on files (and even this seems hit-and-miss when adding file masks to files that have already sync'd)...You may have to close the .SyncIgnore file when you're done editing it (not just save).Then, I exited BTSync on the host of the files (readonly secret, remember), and restarted BTSync ... all of a sudden it deleted on the peer all of the subdirectories I had specified in .SyncIgore (well, moved to .SyncTrash of course). It also deleted a filemask I had specified after the file had already sync'd (although earlier in the test this worked without restarting BTSync).So I guess the lesson for now is just to restart BTSync when you update .SyncIgnore. I would think only restarting BTSync on the host with the changed .SyncIgnore is enough (at least it was in my case, and restarting the read-only peer didn't have any effect).To ignore a subdir I simply specified it like:subdirOr a file within:subdir/fileNothing special. I used "/" in the UNIX-compatible syntax even though it was on Windows. I tried relative and absolute paths (including drive letter) and it didn't work until restarting BTSync. And when I restarted BTSync and saw the changes take effect, I was only using relative paths.I also upgraded the host to build 125 and didn't see any difference in this behavior.I was using Win7 as both the source and the read-only peer for these tests.I observed changes tended to replicate within about 5 seconds on my LAN.Hope this helps a bit!Thanks, useful info right there. Quote Link to comment Share on other sites More sharing options...
stevecrozz Posted June 25, 2013 Report Share Posted June 25, 2013 Can anyone confirm that .SyncIgnore actually functions at all in Linux? I have a huge folder in my home directory that I don't want to index or sync. I tried putting all of these lines in /home/stevecrozz/.SyncIgnore:ProjectsProjects*Projects//home/stevecrozz/Projects/home/stevecrozz/Projects*/home/stevecrozz/Projects/Then I add my home folder (/home/stevecrozz) to btsync. But the .SyncIgnore has no effect. I can run strace -p<btsyncpid> and I can see btsync stat()ing every file in this this folder which takes forever. When its finally done indexing, it does begin to synchronize this folder. How do I make it stop? Quote Link to comment Share on other sites More sharing options...
binarybana Posted June 26, 2013 Report Share Posted June 26, 2013 I can confirm that .SyncIgnore is working on x64 linux with version 1.1.15. Did you try one at a time? I added two simple rules:.gitbuildand it successfully ignores any folder named .git or build and everything under these directories. Quote Link to comment Share on other sites More sharing options...
stevecrozz Posted June 26, 2013 Report Share Posted June 26, 2013 Thanks binarybana, I'm trying the same version of btsync now with a single entry 'Projects' in my .SyncIgnore file. It still isn't ignoring anything. I'm wondering if it has to do with the fact that Projects is actually an encrypted folder mounted with ecryptfs. I'll see I can get .SyncIgnore to work in a smaller folder. The 4-5 hour attempt/fail cycle is not helping me out here. Quote Link to comment Share on other sites More sharing options...
binarybana Posted June 27, 2013 Report Share Posted June 27, 2013 When I was first testing .SyncIgnore, I made a new empty folder, made a few dummy rules and then verified that it worked the way I wanted it to. You might try that to reduce your debug cycle time , and then once you have that working, you can try with a nearly empty ecryptfs mount point too. Quote Link to comment Share on other sites More sharing options...
splattedone Posted July 29, 2013 Report Share Posted July 29, 2013 When adding exclusions to the .SyncIgnoreDo I need to add the whole directory or just keywords or filetypes?Do you modify the .SyncIgnore file that's automatically created and add your blacklist to the bottom? Or do you create a new file and include ONLY the blacklisted items?The .SyncIgnore file I need to modify is on the machine originally holding the files, not the client receiving them, correct?I've been dinking around with this for awhile and can't get it to work at all and am assuming I'm making an elementary mistake, so please point me to an idiot-proof guide. Thanks! Quote Link to comment Share on other sites More sharing options...
Disappointed Cat Posted July 29, 2013 Report Share Posted July 29, 2013 1. Whatever you want. Consider every line a path or pattern that applies to both directories and files.2. Modify the generated file unless you want remove the default rules.3. Correct and for now you manually have to copy the SyncIgnore files to each and every client. The devs still haven't decided if they'd just sync it or make it client specific and apply it to incoming files too (selective sync).There are topics that even have examples for the patterns you can use. Think of it as unix glob paths.Please use the search box to find out more. Quote Link to comment Share on other sites More sharing options...
det Posted October 25, 2013 Report Share Posted October 25, 2013 I have two machines.1. Base, x64 ubuntu with btsync v 1.1.8222. Work, x32 ubuntu with the same version of btsync. Every side works in rw mode, it means full access on both machines.My goal was to synchronize everything on base system, and let the work machine sync only part of the base.So i used default .SyncIgnore on base, but edited work's file with adding:moviesmusicIt does not help. btsync on work still tried to download these folders.Then i edited work's .SyncIgnore with this:/movies*/music*And it works fine. Base synchronized everything, and work machine did not downloaded these two folders.This implementation is similar to using btsync on tablet or smartphone, where you can set diffrent folder to sync, by tapping with finger. Next goal: make synchronizable usb-drive, that i can connect to any of these pcs and start automatical sync.But btsync can't do that, becouse it can't add same sync folder to the usb-drive in one system. It think, that system's sync folder and usb-drive belongs to one "sync unit". Quote Link to comment Share on other sites More sharing options...
datroubler Posted October 18, 2014 Report Share Posted October 18, 2014 Hi! I trying to exclude a folder with the IgnoreList:Windows:\Sonstiges\Programme\Outlook In linux:/Sonstiges/Programme/Outlook Is this correct? Or do I have to remove the first "/" in linux? The problem is that the folders are "out of sync". Quote Link to comment Share on other sites More sharing options...
RomanZ Posted October 24, 2014 Report Share Posted October 24, 2014 @datroublerRemove the leading slash for Linux. It should work fine. Quote Link to comment Share on other sites More sharing options...
Narfe Posted November 27, 2014 Report Share Posted November 27, 2014 (edited) How do I escape special characters? I have folders that start with '+' but just putting '+directory' in .SyncIgnore doesn't seem to work, and the usual escape character '\' doesn't function, as it indicates directory traversal. EDIT: I was able to accomplish this by using a wildcard: '?directory' Edited November 27, 2014 by Narfe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.