Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
透過rsend.sh來搬移檔案 – unethost無限空間虛擬主機 技術分享部落格

透過rsend.sh來搬移檔案

要用rsync來傳檔,非常的方便,但是,壞處就是rsync這個command的語法太複雜了。有時候,我在幫客戶搬上百G的資料時,都是一邊查rsync的語法,一邊用。然而,自從有了rsend.sh這個scripts之後,rsync就簡單多了。
用法是如下,假設,要把sender 端 X資料夾的東西,移到 receiver 的Y 資料夾
Sender 機器 ( 來源資料端 )
(1) 關閉firewall
(2)  cd X    # 切換路徑
(3)  wget   http://acelnmp.googlecode.com/files/rsend.sh  #取得rsend這個script
(4)  mv rsend rsend.sh
       chmod +x ./rsend.sh
      ./rsend.sh
       #  這時候,螢幕上會出現三行指令,選第一行來copy ,然後貼到另一個ssh視窗
receiver 機器  (接收資料端)
(1)   關閉firewall
(2)   cd Y
(3)   rsync -aHvz rsync://example.xxxsystem.com:14845/. .
( 注意,上頭這個複雜的指令,會由rsend.sh在執行的時候,幫你算出來。 所以完全不需要動大腦。XD  )
 完成後,分別在兩台機器上,重新啟動firewall
其他問題:
最後需要注意的是,如果是不同帳號的空間,可能會有帳號權限問題,靠rsend.sh並無法解決,詳情請看: 如何複製不同虛擬主機帳號的檔案?

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

操作上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。