synchronize per CLI: excluded folders are synchronized anyway

Advertisement

mansmans
Guest

synchronize per CLI: excluded folders are synchronized anyway

Hi,

this is my actual command:

synchronize local -delete -mirror -filemask="|/www/app/config/parameters.yml;/www/var/cache/;/www/var/logs/; /www/vendor/;" -criteria=either www www

Basically I just want to mirror the folder
www
from REMOTE to LOCAL despite a few files and folders. The excluded files and folders I want to keep at LOCAL.

The Problem:
For example I want to exclude the /www/var/cache directory from being synchronized.
This works fine if the directory doesn't exist in LOCAL. But if it does, it will just be synchronized anyway, or even just the first few folders of it.

Am I doing something wrong?

Greets, mansmans

Reply with quote

Advertisement

mansmans
Joined:
Posts:
1

So, I tried some more things and it seems the problem was the leading slash. When I remove it, it seems to work fine.

synchronize local -delete -mirror -filemask="|www/app/config/parameters.yml;www/var/cache/;www/var/logs/;www/vendor/;" -criteria=either www www

Update
Nope, the only way I got this really working was to add the masks with and without leading slashes:
synchronize local -delete -mirror -filemask="|/www/app/config/parameters.yml;www/app/config/parameters.yml; /www/var/cache/;www/var/cache/; /www/var/logs/;www/var/logs/; /www/vendor/;www/vendor/;" -criteria=either www www

With leading slashes only the folders get synchronized anyway if they exist.
Without leading slashes only the folders get synchronized anyway if they don't exist.

Only using the paths with leading slashes AND without leading slashes they are really excluded.

Maybe someone can explain why that is so.

Reply with quote

Advertisement

You can post new topics in this forum