数据同步利器syncthing
Posted zqyx
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了数据同步利器syncthing相关的知识,希望对你有一定的参考价值。
有了私服当然就得备份数据了,手机照片,工作目录,经典电影之类的,DT时代数据无价。
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底下的。
最后来几张部署完成的图:
以上是关于数据同步利器syncthing的主要内容,如果未能解决你的问题,请参考以下文章
Server ❀ Syncthing安装部署,一种新型的文件同步工具(免费)