Skip to content

Instantly share code, notes, and snippets.

@werdan
Last active August 29, 2015 14:04
Show Gist options
  • Save werdan/134a2ddf58f526078b94 to your computer and use it in GitHub Desktop.
Save werdan/134a2ddf58f526078b94 to your computer and use it in GitHub Desktop.
Magento media rsynce
#!/bin/bash
REMOTE_USER='root'
REMOTE_HOST='123.123.123.123'
REMOTE_PORT='22'
LOCAL_BASE_FOLDER='/var/www/shared'
REMOTE_BASE_FOLDER='/var/www/shared'
echo "Media synchronization started..."
rsync -avzlr --verbose -e "ssh -p $REMOTE_PORT" --exclude '$LOCAL_BASE_FOLDER/media/catalog/product/cache' --exclude '$LOCAL_BASE_FOLDER/media/cache' $LOCAL_BASE_FOLDER/media $REMOTE_USER@$REMOTE_HOST:$REMOTE_BASE_FOLDER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment