Closed tylers-username closed 6 years ago
I'm happy with --exclude
because you've presented a use case, but I'm not sure --include
is also necessary. I would want to avoid these mount
commands being too complex. "Power users" can use things like "rsync "$(platform ssh --pipe)":foo bar
" directly if necessary.
By the way, rsync
accepts patterns like this:
platform mount:download -y --mount media --target media --exclude '**/cache'
... well I just experimented quickly and ended up adding both options in the PR above
Thanks for the perspective and for taking action. I'll play with your pull request on the development branch. I expect this to be very useful when it comes to minimizing time to download mounts.
No need to use development
, it's deployed in v3.23.0 :)
Feature suggestion
Add ability to include or exclude files when uploading to or downloading from a mount.
Use case
As a developer, I need to downloading my media directory and exclude cached images.
Suggested command format
Implementing Symfony Consoles
InputOption::VALUE_IS_ARRAY
:platform mount:download -y -m media --target media --exclude="catalog/product/cache" --exclude="wysiwyg/thumbnails/cache"
Contributing
I am happy to develop this feature, but before I get down and dirty I'd like to ensure (1) that it is needed and (2) how Platform.sh prefers it to be implemented.