(二)數據同步利器syncthing


數據互備肯定是首選需求

有了娃之后手機最大的限制就是照片太多了不舍得刪,想象一下回到家里就自動備份到私有雲上,再不怕丟失。

syncthing

Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers. We strive to fulfill the goals below. The goals are listed in order of importance, the most important one being the first. This is the summary version of the goal list - for more commentary, see the full Goals document.

選擇這個的目的很簡單:

1. 支持多平台,windows、Android、ios、centos等

2. 界面友好,便於使用

3. 支持docker化部署

github地址為:https://github.com/syncthing/syncthing

找docker鏡像的方式也挺簡單:

# docker search syncthing

 

 

 如何跑docker,詳見github上的鏈接:https://github.com/syncthing/syncthing/blob/master/README-Docker.md

為了加快傳輸速度,docker中使用host網絡策略

Discovery

Note that local device discovery will not work with the above command, resulting in poor local transfer rates if local device addresses are not manually configured.

To allow local discovery, the docker host network can be used instead:

$ docker pull syncthing/syncthing
$ docker run --network=host \
    -v /wherever/st-sync:/var/syncthing \
    syncthing/syncthing:latest

Be aware that syncthing alone is now in control of what interfaces and ports it listens on. You can edit the syncthing configuration to change the defaults if there are conflicts.

由於我本機跑了docker-compose,所以https也是掛在nginx底下的。

最后來幾張部署完成的圖:

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM