It's simple command for transfer a large number of small files over ssh.
You need to first go to directory, if you want to copy content of directory.
cd /var/www
tar cpf - ./ | ssh <user>@<dest_ip> "tar xpf - -C /var/www"Preview speed copy with pv:
| firewall_enable="YES" | |
| firewall_script="/etc/rc.firewall" | |
| firewall_logging="YES" |
| #!/bin/bash | |
| ip=`echo $SSH_CONNECTION | cut -d " " -f 1` | |
| hostname=`hostname` | |
| fqdn=`hostname -f` | |
| logger -t ssh-wrapper $USER login from $ip | |
| sendmail -t <<EOF | |
| To: Alex <[email protected]> |
| #!/bin/bash | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| HOST=smtp.yandex.ru | |
| [email protected] | |
| PASSWORD=password | |
| PORT=465 | |
| TO=$1 | |
| SUBJECT=$2 |