rsyncで、公開鍵認証を指定する方法。ソース側のサーバに、公開鍵認証で接続しています。
コピー元の指定の最後のスラッシュを忘れると、ディレクトリabcが/var/www/html/abcの中に作成されてしまうのでご注意下さい。
rsync -av -e "ssh -i /root/hogehoge.pem" [email protected]:/var/www/html/abc/ /var/www/html/abc/
receiving incremental file list
8bc32d2b0a/
8bc32d2b0a/821985286d/
8bc32d2b0a/821985286d/abc.html
sent 714 bytes received 704554 bytes 1410536.00 bytes/sec
total size is 97557392 speedup is 138.33
receiving incremental file list
8bc32d2b0a/
8bc32d2b0a/821985286d/
8bc32d2b0a/821985286d/abc.html
sent 714 bytes received 704554 bytes 1410536.00 bytes/sec
total size is 97557392 speedup is 138.33