架構:
一、A 使用 ssh 登入 B 不用密碼
二、把 B 的東西備份到 A

一、參考ssh + no password login作法

      ref: http://ssorc.tw/?p=260

二、A 端執行 rsync,會把 B 端的 httpd 目錄 放至 A 端的 httpd_tmp 目錄裡
      rsync -av –delete -e ssh 192.168.1.12:/var/log/httpd /var/log/httpd_tmp

現在習慣這麼下
rsync -av –delete root@192.168.1.12:/var/log/httpd /var/log/httpd_tmp
 
參考文件:
http://fanqiang.chinaunix.net/a6/b7/20010908/1305001258_b.html
http://linux.tnc.edu.tw/techdoc/rsync.htm
http://phorum.study-area.org/viewtopic.php?t=15553
http://www.adj.idv.tw/server/linux_rsync.php
http://phorum.study-area.org/viewtopic.php?t=23179&highlight=ssh-keygen

Related posts 相關文章
xz liblzma 漏洞後門事件
More...
架設 VPN 服務 – WireGuard – 主打比 IPSec、OpenVPN 更快、安全
More...
ssh 到裝有 cygwin openssh 的 windows 主機卻出現 no kex alg 錯誤
More...
用 rsync 傳資料到 rsyncD 873 會有錯誤 Operation not permitted
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。