Created
October 12, 2018 15:40
-
-
Save cronfy/4d79f42b219ae66937799a6c2916ef94 to your computer and use it in GitHub Desktop.
bitrix rsync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fast and explore | |
SERVER=xxx | |
WWWROOT=/home/bitrix/www | |
# fast and explore | |
cd public_html | |
# первая часть exlude для ускорения на первом этапе, чтобы просто увидеть все, что скачается, и при необходимости | |
# добавить правки во вторую часть | |
# вторая часть exclude - исключение лишнего | |
rsync -av \ | |
--exclude='y-market' --exclude='*.jar' --exclude='*.orig' --exclude='*.map' --exclude='*.html' \ | |
--exclude='*.svg' --exclude='*.csv' --exclude='*.woff' --exclude='*.eot' --exclude='*.ttf' --exclude='*.woff2' \ | |
--exclude='*.cab' --exclude='*.png' --exclude='*.xsd' --exclude='*.jpg' --exclude='*.xml' --exclude='*.gif' \ | |
--exclude='*.js' --exclude='*.php' --exclude='*.css' \ | |
\ | |
--exclude=bitrix/managed_cache --exclude=bitrix/html_pages --exclude=bitrix/backup --exclude=bitrix/cache \ | |
--exclude=bitrix/catalog_export --exclude=upload --exclude=bitrix/tmp \ | |
--exclude='*.log' --exclude='*.zip' --exclude='*.bak' --exclude='*.tar.gz' \ | |
$SERVER:$WWWROOT ./ | |
# ... some tuning before final rsync if necessary ... | |
# and then final rsync | |
# для финальной загрузки оставляем только вторую часть exclude и добавляем delete для удаления лишнего, которое | |
# все-таки успело скачаться | |
rsync -av \ | |
--delete --delete-excluded \ | |
--exclude=bitrix/managed_cache --exclude=bitrix/html_pages --exclude=bitrix/backup --exclude=bitrix/cache \ | |
--exclude=bitrix/catalog_export --exclude=upload --exclude=bitrix/tmp \ | |
--exclude='*.log' --exclude='*.zip' --exclude='*.bak' --exclude='*.tar.gz' \ | |
$SERVER:$WWWROOT ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment