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

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

     

  • 相关阅读:
    python--binascii--二进制和ASCII编码的二进制的转换
    python--you-get视频下载
    python--AES加密
    nodejs的简单爬虫
    golang学习之接口型函数
    golang学习之defer
    golang学习之slice基本操作
    微信小程序初体验
    vuex构建笔记本应用学习
    2016年终总结
  • 原文地址:https://www.cnblogs.com/zqyx/p/12656310.html
Copyright © 2020-2023  润新知