rsync のインストール

AWS Debian

自宅サーバからファイルを持ち込むために rsync をインストールする

パッケージのインストール

yasunari@aws:~$ sudo apt-get install rsync
[sudo] password for yasunari:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  rsync
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 393 kB of archives.
After this operation, 703 kB of additional disk space will be used.
Get:1 http://security.debian.org stretch/updates/main amd64 rsync amd64 3.1.2-1+deb9u1 [393 kB]
Fetched 393 kB in 1s (251 kB/s)
Selecting previously unselected package rsync.
(Reading database ... 33972 files and directories currently installed.)
Preparing to unpack .../rsync_3.1.2-1+deb9u1_amd64.deb ...
Unpacking rsync (3.1.2-1+deb9u1) ...
Setting up rsync (3.1.2-1+deb9u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rsync.service  皴lib/systemd/system/rsync.service.
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
yasunari@aws:~$
起動
yasunari@aws:~$ sudo systemctl restart rsync
yasunari@aws:~$

自宅から接続

試しに、/etc/hosts を送ってみる
yasunari@xhl:~$ rsync -rtuvpogtlH --timeout=360 -e "ssh -p 内緒 -i /home/yamasita/yasunari/.ssh/aws1.pem" /etc/hosts aws.yamasita.jp:/tmp
sending incremental file list
hosts

sent 280 bytes  received 31 bytes  207.33 bytes/sec
total size is 207  speedup is 0.67
yasunari@xhl:~$
多分、余計なオプションつけすぎ(笑

get してみる

yasunari@xhl:~$ rsync -rtuvpogtlH --timeout=360 -e "ssh -p 内緒 -i /home/yamasita/yasunari/.ssh/aws1.pem" aws.yamasita.jp:/tmp/hosts /tmp
receiving incremental file list
hosts

sent 42 bytes  received 317 bytes  239.33 bytes/sec
total size is 207  speedup is 0.58
yasunari@xhl:~$ diff /etc/hosts /tmp/hosts
yasunari@xhl:~$
OK

ssh のポートを変更する
山下康成の
雲の上

メールサーバの構築(4)alias の設定

Copyright (C) 2003-2018 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市/東京都新宿区