熱門文章

2016年8月7日 星期日

[Raspberry Pi]BitTorrent Sync雲端硬碟運用

介紹BitTorrent Sync

這是利用B2B技術來將私有裝置的檔案同步的功能,不透過網上的雲端硬碟,可以達到快速並安全的效果。缺點是裝置必須開啟才有辦法同步取得資料。
所以我想到的運用是將我的rpi接上外接硬碟,備份檔案至硬碟,也可以是Apple的Time Machine。


安裝BitTorrent Sync

Pi -Terminal

安裝
$ wget https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz


執行畫面
converted 'https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz' (ANSI_X3.4-1968) -> 'https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz' (UTF-8)
--2016-08-07 23:16:46--  https://download-cdn.getsync.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz
Resolving download-cdn.getsync.com (download-cdn.getsync.com)... 54.192.127.218, 54.192.127.148, 54.192.127.13, ...
Connecting to download-cdn.getsync.com (download-cdn.getsync.com)|54.192.127.218|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5257229 (5.0M) [application/x-tar]
Saving to: 'BitTorrent-Sync_arm.tar.gz'

BitTorrent-Sync_arm.tar.gz                           100%[=======================================================================================================================>]   5.01M  1.58MB/s   in 4.0s   


2016-08-07 23:16:51 (1.25 MB/s) - 'BitTorrent-Sync_arm.tar.gz' saved [5257229/5257229]

新增資料夾(安裝位置)
$ mkdir ~/btsync

btsync 為資料夾名稱,可以自訂

解壓縮
$ tar -xvf BitTorrent-Sync_arm.tar.gz -C ~/btsync

執行畫面,解壓出三個檔案
LICENSE.TXT
README

btsync

開啟btsync資料夾
$ cd btsync/

閱讀
$ vi ./README

內容片段
...
After extracting this tarball, just run:

  $ ./btsync

to start the Sync daemon.
Then go to localhost:8888 in a web browser to access the WebUI.

IMPORTANT NOTE:
To improve security, the LAN listening interface is off unless you configure it.
By default the WebUI is only accessible on the computer running Sync
(localhost:8888). In order to have the WebUI accessible across the
LAN, use a configuration file or start Sync this way:


  $ ./btsync --webui.listen 0.0.0.0:8888
...

得知開啟的方法
跳出vi,請輸入括號內紅字 ':quit'

在btsync目錄下,輸入(白字部分)
~/btsync $ ./btsync --webui.listen 0.0.0.0:8888

執行畫面
By using this application, you agree to our Privacy Policy, Terms of Use and End User License Agreement.
https://www.getsync.com/legal/privacy
https://www.getsync.com/legal/terms-of-use
https://www.getsync.com/legal/eula


Webui is listening on 0.0.0.0:8888


如果是輸入
~/btsync $ ./btsync

則執行畫面
By using this application, you agree to our Privacy Policy, Terms of Use and End User License Agreement.
https://www.getsync.com/legal/privacy
https://www.getsync.com/legal/terms-of-use
https://www.getsync.com/legal/eula

Webui is listening on 127.0.0.1:8888


差異是前者可以使用遠端如上一篇的ssh操作,而後者只能本機操作
本機操作方法為開啟網頁輸入   0.0.0.0:8888    or  127.0.0.1:8888




Mac端SSH連線開啟畫面如下
網頁輸入'http://[hostname].local:8888/gui/'
我本身的例子是:http://rpi3-1.local:8888/gui/


安裝好之後的操作可以參考這裡




版本差異 here






免費版無法使用加入裝置的方式
點選上圖右上角來免費試用30天




參考:
http://blog.itist.tw/2015/07/using-btync-to-sync-files-between-all-your-devices.html

https://free.com.tw/bittorrent-sync/

https://getsync.com



沒有留言:

張貼留言