![ServerSync](https://media.forgecdn.net/avatars/thumbnails/254/696/256/256/637199290945083080.png)
Folder ignore list
MarioSMB opened this issue · 6 comments
The file ignore list is extremely useful, however it doesn't allow excluding entire folders (an example of this would be the 'Biome Bundle' folder inside mods, which contains so many files of varying names that it kills the connection).
It would be nice to have an option to exclude folders from transferring.
Same issue here. The lack of this feature makes this program basically unusable for me. Though I have come up with a workaround. But it requires the client running a bat script. What it does, it it moves all folders out of the mods folder, then syncs, then moves them all back. It does require the server to have a separate place to sync from too. I basically just duplicated the mods folder from the server, but without the OTG folders and stuff.
My bat file looks like this:
FOR /d %%i IN (mods\*) DO move "%%i" sync\%%~ni
java -jar serversync.jar progress-only
FOR /d %%i IN (sync\*) DO move "%%i" mods\%%~ni
cd mods\
ren 1 1.12.2
echo Update compleate!
pause
For some reason the 1.12.2 folder gets renamed to just 1, so I have to manually set it back to the correct name.
Have your clients run that bat file instead of serversync.jar and it should work correctly. However I have not given this to any of my clients yet, just tested it myself. So may not work completely.
Makes sense to have some smarts around directories in the ignore list so that it includes all sub entities.
In the mean time you can exclude entire folders using glob patterns.
file_ignore_list <
mods/BiomeBundle/**/*
>
Note: **/*
pretty much describes 'match anything in any folder'.
More examples can be found here in the wiki: https://github.com/superzanti/ServerSync/wiki/Ignore-&-include-lists-examples
@posicat
Compressing files is a pretty decent plan, I would be interested to see if it can be baked into SS somewhere in the transfer layer 🤔.
We had a similar issue at work, it ended up being much more efficient to create a .zip file of the files to transfer rather than spewing them over the network one at a time. Then just sync that zip and unpack i on the other end. As a bonus you get compression and faster transfer speeds.
3.0 is out, it does not directly include folder ignoring. Might help with the OP issue though.
It can be found here: https://github.com/superzanti/ServerSync/releases
Closing this ticket to be covered by #215