Sync Config File Read Only, Overwrite_Changes


samby

Recommended Posts

I have some folders I want to sync in read only mode. There are two things I seek to understand.

 

1. read only secret and read write secret

2. overwrite_changes option

 

I have 4 systems these folders will be synced between. 1 (master) 3 (slaves). If a changes is made to a file on a slave I want it to be reverted to the origional on the next sync interval. Everything will be running on a headless system so i'm using the btsync.conf file. The master is a linux os, the 3 slaves are windows os.

 

I have setup two seperate config files one for the server, and one for the slaves. 

 

Q1: Where do I put ("overwrite_changes" : true,)  in the client config or server config?

Q2: When setting up the server config file do I need both the read write and read only secrets in the shared folders section or can I just have the read only secret there?

 

Here are examples config files

 

Master:

{
  "device_name" : "Master sync",
  "listening_port" : 1234,
  "storage_path" : "/home/btsync",
  "folder_rescan_interval": 60,
  "pid_file" : "/home/btsync/btsync.pid",
  "check_for_updates" : false,
  "use_upnp" : false,

  "shared_folders": [
        {
   "secret" : "ReadWrite",
   "secret" : "ReadOnly",
            "dir" : "/home/btsync/folder_A",
            "use_relay_server": false,
            "use_tracker": false,
            "use_dht": false,
            "search_lan": false,
            "use_sync_trash": false,
        },
        {
            "secret" : "ReadWrite",
            "secret" : "ReadOnly",
            "dir" : "/home/btsync/folder_B",
            "use_relay_server": false,
            "use_tracker": false,
            "use_dht": false,
            "search_lan": false,
            "use_sync_trash": false,
        }
    ]
}

 

Slave:

{
    "listening_port" : 1234,
    "storage_path": "C:/Program Files (x86)/BitTorrent Sync",
    "folder_rescan_interval": 60,
    "use_gui": false,
    "check_for_updates" : false,
    "use_upnp" : false,
    "shared_folders": [
        {
            "secret" : "ReadOnly",
            "dir" : "c:/BTSync/folder_A",
            "use_relay_server": false,
            "use_tracker": false,
            "use_dht": false,
            "search_lan": false,
            "use_sync_trash": false,
            "overwrite_changes" : true, 
            "known_hosts": [
                "MasterIP:1234"
            ]
        },
        {
            "secret" : "ReadOnly",
            "dir" : "c:/BTSync/folder_B",
            "use_relay_server": false,
            "use_tracker": false,
            "use_dht": false,
            "search_lan": false,
            "use_sync_trash": false,
            "overwrite_changes" : true,
            "known_hosts": [
                "MasterIP:1234"
            ]
        }
    ]
}

 

Link to comment
Share on other sites

  • 1 month later...

I know this is an old post, but just for the record to answer the questions here:

 

Q1: Where do I put ("overwrite_changes" : true,)  in the client config or server config?

Just the Client Config. 

 

Q2: When setting up the server config file do I need both the read write and read only secrets in the shared folders section or can I just have the read only secret there?

RW key on Master and RO on slaves. But remember also that slaves will sync between them once they know each other.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.