Skip to content

Instantly share code, notes, and snippets.

@Marko-M
Last active January 1, 2016 23:19
Show Gist options
  • Save Marko-M/8215671 to your computer and use it in GitHub Desktop.
Save Marko-M/8215671 to your computer and use it in GitHub Desktop.
#!/bin/bash
# magento-transfer-1.sh
# Marko Martinovic
#
# Initiate on a new web server
# Maintenance mode not required
# Prints command traces
set -x
# SSH user
SRC_SSH_USER=""
# SSH host
SRC_SSH_HOST=""
# SSH port
SRC_SSH_PORT=""
# Source document root path (absolute)
SRC_DOCROOT_PATH=""
# Destination document root path (absolute)
DST_DOCROOT_PATH=""
# rsync the code (incremental, supports non standard port)
rsync -avz -e "ssh -p $SRC_SSH_PORT" $SRC_SSH_USER@$SRC_SSH_HOST:$SRC_DOCROOT_PATH $DST_DOCROOT_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment