You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
424 B

  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. . $SCRIPT_DIR/_settings.sh || {
  4. echo "no settings" && exit 1
  5. }
  6. REMOTE_FROM_DIR_PATH=some_absolute_path_without_end_slash
  7. DESTINATION_DIR_PATH=/var/www/html/wp-content/uploads
  8. echo -n "Upload... "
  9. rsync -a --info=progress2 -e "ssh -p ${REMOTE_SSH_PORT}" $REMOTE_SSH_USER@$REMOTE_SSH_HOST:$REMOTE_FROM_DIR_PATH/ $DESTINATION_DIR_PATH/
  10. echo "OK"