How To Add Folder_Rescan_Interval And Advanced Lines To Config File?


calvyb

Recommended Posts

I'm running bit torrent sync on a dlink nas dns-320l and after reading several forums about how sync prevents the nas entering sleep mode and to increase the sync interval in order to resolve it.

 

the problem I have is whenever I add the line

"folder_rescan_interval":36000 sync crashes and fails to work. when I take the line out of the file it works again.

 

I've also tried "folder_rescan_interval" : 36000 (with spaces) tried to add a comma and always end up with the same problem sync crashes and fails to work.

 

so my question is exactly where and how do  I add this line to my config file. along with any brackets or parenthesis I may need.

 

thanks

Link to comment
Share on other sites

I'm running bit torrent sync on a dlink nas dns-320l and after reading several forums about how sync prevents the nas entering sleep mode and to increase the sync interval in order to resolve it.

 

the problem I have is whenever I add the line

"folder_rescan_interval":36000 sync crashes and fails to work. when I take the line out of the file it works again.

 

I've also tried "folder_rescan_interval" : 36000 (with spaces) tried to add a comma and always end up with the same problem sync crashes and fails to work.

 

so my question is exactly where and how do  I add this line to my config file. along with any brackets or parenthesis I may need.

 

thanks

 

 

Hi, try here:

 

 

/* storage_path dir contains auxilliary app files

if no storage_path field: .sync dir created in the directory

where binary is located.

otherwise user-defined directory will be used

*/

"storage_path" : "/home/btsync/data/",

"folder_rescan_interval": 36000,

Link to comment
Share on other sites

Hi, try here:

 

 

/* storage_path dir contains auxilliary app files

if no storage_path field: .sync dir created in the directory

where binary is located.

otherwise user-defined directory will be used

*/

"storage_path" : "/home/btsync/data/",

"folder_rescan_interval": 36000,

 

That won't work - the config file needs to be valid JSON. Your example would also require opening and closing { } marks and removal of the comma on the last line.

 

Consider running Sync with the "--dump-sample-config" command line switch which will generate an example valid config file for you.

Link to comment
Share on other sites

That won't work - the config file needs to be valid JSON. Your example would also require opening and closing { } marks and removal of the comma on the last line.

 

Consider running Sync with the "--dump-sample-config" command line switch which will generate an example valid config file for you.

Ok thanks. I have a file.conf with valid config. Now to configure in our Nas NSA32x:

 

- Where we put "folder_rescan_interval" lines?¿ (I need can hibernate our NAS )

- Where we save config file?. Now we have btsync service at /usr/local/zy-pkgs/var/  and there´s created a btsync.conf at /usr/local/zy-pkgs/etc/      . Overwritte lastone?

 

Thanks for all!

Edited by dstroy
Link to comment
Share on other sites

- Where we put "folder_rescan_interval" lines?¿ (I need can hibernate our NAS )

 

The sample config file provides a hint at where these lines could go, but if in doubt, add them at the very end of the file right before the final closing "}" character.

 

- Where we save config file?. Now we have btsync service at /usr/local/zy-pkgs/var/ and there´s created a btsync.conf at /usr/local/zy-pkgs/etc/ . Overwritte lastone?

Yes, you can overwrite the current config file (back it up though first!) or save it somewhere else and run Sync with the --config <path_to_config> command line switch [More info]

Link to comment
Share on other sites

 

The sample config file provides a hint at where these lines could go, but if in doubt, add them at the very end of the file right before the final closing "}" character.

 

Yes, you can overwrite the current config file (back it up though first!) or save it somewhere else and run Sync with the --config <path_to_config> command line switch [More info]

Ok GreatMarko I follow step by step:

1º) At btsync binary I dumped config:

btsync --dump-sample-config >> btsync.conf

cp btsync.conf /usr/local/zy-pkgs/etc/  <---- This overwrite actually config

2º) I patch de config

btsync --config /usr/local/zy-pkgs/etc/btsync.conf  <---- All ok, btsync and GUI works ok!

 

3º) I add interval lines: 

 

/usr/local/zy-pkgs/etc # cat btsync.conf
{
  "device_name": "My Sync Device",
  "listening_port" : 0,                       // 0 - randomize port
 
/* storage_path dir contains auxilliary app files
   if no storage_path field: .sync dir created in the directory
   where binary is located.
   otherwise user-defined directory will be used
*/
  "storage_path" : "/usr/local/zy-pkgs/var/btsync",
 
// uncomment next line if you want to set location of pid file
// "pid_file" : "/var/run/syncapp/syncapp.pid",
 
 
  "check_for_updates" : false,
  "use_upnp" : true,                              // use UPnP for port mapping
 
 
/* limits in kB/s
   0 - no limit
*/
  "download_limit" : 0,
  "upload_limit" : 0,
 
/* remove "listen" field to disable WebUI
   remove "login" and "password" fields to disable credentials check
*/
  "webui" :
  {
    "listen" : "0.0.0.0:8888" // ,
//    "login" : "admin",
//    "password" : "password"
  }
 
/* !!! if you set shared folders in config file WebUI will be DISABLED !!!
   shared directories specified in config file
   override the folders previously added from WebUI.
*/
/*
  ,
  "shared_folders" :
  [
    {
//  use --generate-secret in command line to create new secret
      "secret" : "MY_SECRET_1",                   // * required field
      "dir" : "/home/user/bittorrent/sync_test", // * 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.1.2:44444",
        "myhost.com:6881"
      ]
    }
  ]
*/
 
// Advanced preferences can be added to config file.
// Info is available in BitTorrent Sync User Guide.
,"config_refresh_interval" : 43200
,"folder_rescan_interval" : 43200
 
}
/usr/local/zy-pkgs/etc #
 
GUI and btsync is Ok, but HDD follow spinning 24h. When I stop btsync service It go sleep at 15min, so btsync is the only using HDD in all moments.
 
What have i done bad??
 
Thanks for all!!
Link to comment
Share on other sites

  • 2 weeks later...

Hi.

 

Now this is my config. I added config_refresh and folder rescan and HDDs don´t sleep...

 

/usr/local/zy-pkgs/etc # cat btsync.conf
{
"device_name": "DaniNAS",
"listening_port" : 0,
"storage_path" : "/usr/local/zy-pkgs/var/btsync",
"config_refresh_interval" : 43200,
"folder_rescan_interval" : 43200,
"check_for_updates" : false,
"use_upnp" : true,
"download_limit" : 0,
"upload_limit" : 0,
"webui" :
{
"listen" : "0.0.0.0:8888" ,
"login" : "dani",
"password" : "aaa"
}
}/usr/local/zy-pkgs/etc #
 
 
I´m using btsync 1.4.110 beta...I don´t know what to do...
Link to comment
Share on other sites

Try also adding the "config_save_interval" parameter, and set it high like "config_refresh_interval" and "folder_rescan_interval"

Nothing...I have been two days testing and if i dont stop service hds follow without sleep. Any Way? Arm..seems not catch these Advanced configurartion

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.