btsync多客户端同步的设置

现有客户端 192.168.0.100,192.168.0.101 分别是2台linux客户端 192.168.0.200 是windows客户端 首先,完成192.168.0.100的btsync的配置
{ 
  "device_name": "192.168.0.100",
  "listening_port" : 36000,                       // 0 - randomize port
  "storage_path" : "/opt/sync/.sync",
  "check_for_updates" : true, 
  "use_upnp" : true,                              // use UPnP for port mapping
  "download_limit" : 0,                       
  "upload_limit" : 0, 
  "shared_folders" :
  [
    {
//  use --generate-secret in command line to create new secret
      "secret" : "AEAA4BHZWSG5WDDJ6G6Z3EXOLD4TNPDU6",                   // * required field
      "dir" : "/opt/sync/data", // * required field

//  use relay server when direct connection fails
      "use_relay_server" : true,
      "use_tracker" : true, 
      "use_dht" : false,
      "search_lan" : true,
//  enable sync trash to store files deleted on remote devices
      "use_sync_trash" : true,
//  specify hosts to attempt connection without additional search     
      "known_hosts" :
      [
        "192.168.0.100:36000"
      ]
    }
  ]
}
192.168.0.101的配置 这里采用只读的默认,只读模式的secret来自100上面的secret生成而来
btsync --get-ro-secret AEAA4BHZWSG5WDDJ6G6Z3EXOLD4TNPDU6
生成的结果是
BY3I5QYRQABTCNY3FBO23KAPM3RCOP22G
然后复制到101的配置文件里面,其他都不用修改 windows的客户端,安装完成软件之后,点击“文件夹”选项,新增“同步文件夹”。 在“完全访问密钥”里面粘贴:
AEAA4BHZWSG5WDDJ6G6Z3EXOLD4TNPDU6
完成以上的配置,也就说说200和100是完全同步的,101只是读取100的配置,自己的修改不会影响到其他客户端 下面开始测试 100新增文件,101完成同步,200完成同步 200新增文件,100完成同步,101完成同步 101新增文件,100不变换,200不变化 如果101在同步前已经有同名的文件存在,100或者200新增文件,101不会同步  

你可能感兴趣的:(linux)