Pergunta

rsync -av --delete --filter=':- .gitignore' \mysite\ezpublish_git\ john@local.mysite.co.uk:/usr/local/www/apache24/data/trunk/

or

rsync -av --delete --filter=':- .gitignore' /mysite/ezpublish_git/ john@local.mysite.co.uk:/usr/local/www/apache24/data/trunk/

or

rsync -av --delete --filter=':- .gitignore' \mysite\ezpublish_git/ john@local.mysite.co.uk:/usr/local/www/apache24/data/trunk/

I need to dump the contents of: c:/mysite/ezpublish_git/ into a virtual machine with host entry local.mysite.co.uk. The ssh keys are set up for the rsync to run without a password prompt.

The rsync command runs but then it creates a new directory within the destination "trunk" named "ezpublish_git".

This works perfectly on a mac, and the contents are copying over and not the directory.

I am aware that the trailing slash is meant to determine if rsync should copy the directory or the contents and have tried both, but both end in the same result: the target directory being copied into the destination.

Does anyone have an idea what i might be doing wrong?

Thanks, John

Foi útil?

Solução

So someone more skilled than I pointed out the answer.. simple. Add an * to the end, solves the issue but yet to test on directories and files starting .

rsync -av --delete --filter=':- .gitignore' \mysite\ezpublish_git\* john@local.mysite.co.uk:/usr/local/www/apache24/data/trunk/
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top