(二)数据同步利器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底下的。

最后来几张部署完成的图:

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值