BTSync prevents NAS to enter sleep mode?


Recommended Posts

nicopizza,

 

There are 2 modes of running btsync on Linux-based platforms.

1) WebUI. You just run btsync, then access the IP of your box over port 8888 to reach webUI

2) Config. You make a config file and run btsync with "--config <config_file_name>" command to force it grabbing all the configuration from config file.

 

On linux, you can adjust advanced parameters only with 2nd way. I suggest that you are running it with WebUI.

Link to post
Share on other sites

thanks for the replies. I think I got it... still I am wondering why just running btsync does not create automatically a .config file where one can set advanced parameters (or, even better, does not create a WebUI section where one can set these parameters)...

I'll study this and see if I can write a .config and run btsync with it...

Link to post
Share on other sites

{ "device_name": "MyCloud", "listening_port" : 0,                       // 0 - randomize port "check_for_updates" : true, "use_upnp" : true, "download_limit" : 0, "upload_limit" : 0, "folder_rescan_interval" : 10800, "lan_encrypt_data" : false, "rate_limit_local_peers" : true, "lan_use_tcp" : true,//"use_relay_server" : false,//"use_tracker" : false,//"use_dht" : false,}  

So, I did a little study:

The one above could be the btsync.config :

 

And now for the command... well, I dunno... perhaps, assuming that both btsync.bin and btsync.config are located in \shares\Public\, something like:

chmod +x /shares/Public/btsync

/shares/Public/./btsync --config <btsync.config>

 

Do you think this could work?

Ok, spoke too soon... the User Guide is very helpful in dealing with this... I suggest everybody interested in this to read it...

Link to post
Share on other sites

nicopizza,

 

Usually btsync binary goes in tar ball archive with execute attr, so you don't need to set it. Also, in your config file there is redundant comma symbol. Also, I'd advise to config your shares directly in the config files, or you won't have one.

 

I think I got it... still I am wondering why just running btsync does not create automatically a .config file where one can set advanced parameters (or, even better, does not create a WebUI section where one can set these parameters)...

BTSync stores all the data in it's own format config files, native for all BitTorrent products. So would it be config file or webui configuring BTSync, at the end of day settings are converted and stored into the internal format.

Link to post
Share on other sites

Thank you again!

I am just a novice to Debian, so I still find it difficult to understand everything...

So, if I got it right, at the end of the day, I just need to execute the btsync.bin with the "--config btsync.config" bit at the end of the line (I just used the --dump-sample-config to get the config file and add the "folder_rescan_interval" setting).

 

Two questions, if I may:

- Should I keep the btsync.bin and btsync.config somewhere in my NAS (other than in a share, like Public share, but rather in a place like /usr/sbin)?

- I do not get what you mean by: "I'd advise to config your shares directly in the config files, or you won't have one."

Thank you so much again!

Link to post
Share on other sites

So, if I got it right, at the end of the day, I just need to execute the btsync.bin with the "--config btsync.config" bit at the end of the line (I just used the --dump-sample-config to get the config file and add the "folder_rescan_interval" setting).

Right. And make sure that it is executed in that way every start of your NAS.
 

 

 

- Should I keep the btsync.bin and btsync.config somewhere in my NAS (other than in a share, like Public share, but rather in a place like /usr/sbin)?

Well, its up to you. You can follow Linux guidelines to store files, or just put both binary and config to your home user directory. Just make sure that user running BTSync has RW access to its files.

 

- I do not get what you mean by: "I'd advise to config your shares directly in the config files, or you won't have one."

Thank you so much again!

It means that even if you have WebUI enabled in your config file, you need to pre-configure your shared folders in config file, not in WebUI.
Link to post
Share on other sites
  • 3 months later...

I have just installed 1.3-106.2 on my Synology DS414 as a package from http://www.synocommunity.com and found that if kept on writing messages to /var/log/messages every few seconds. The messages looked like this:

 

Jul 22 13:12:59 DS414 entry.cgi_SYNO.Core.Security.Firewall.Rules.Serv[1].policy_check[3243]: service_conf_ports_get.c:185 protocol format error (tcp,3838/udp)! It should be "tcp" or "udp" or "tcp,udp", synoerr=[0x0D00 service_conf_ports_get.c:184]
Jul 22 13:12:59 DS414 entry.cgi_SYNO.Core.Security.Firewall.Rules.Serv[1].policy_check[3243]: service_conf_section_get.c:394 Service get port error, filepath: /usr/local/etc/services.d/btsync.sc, section name: btsync, target: dstPort, synoerr=[0x0D00 service_conf_ports_get.c:184]
Jul 22 13:12:59 DS414 entry.cgi_SYNO.Core.Security.Firewall.Rules.Serv[1].policy_check[3243]: service_conf_get.c:188 Get service section fail. (file: /usr/local/etc/services.d/btsync.sc), synoerr=[0x0D00 service_conf_ports_get.c:184]

 

I checked /usr/local/etc/services.d/btsync.sc and the syntax seemed correct to me. Even though it looked correct, I decided to change the file and remove the reference to the tcp port:

 

[btsync]
title="BitTorrent Sync"
desc="BitTorrent Sync"
port_forward="yes"
dst.ports="3838/udp"

 

After the change, the messages in /var/log/messages were no longer written, and the webui on port 8888 could still be used. I know that many people have issues with BTSync keeping their NAS from going to sleep. Could it be this was the issue?

Link to post
Share on other sites
  • 1 month later...

Still not resolved - cant switch off using cron because of http://forum.bittorrent.com/topic/30338-newer-files-overwritten-by-older-files-btsync-1394/page-2 and when decide to keep it going BTSync prevents my NAS from sleep which is also a no-go. Not useable the way it works now. Hopefully there will be a fix out soon - I am about to give it up and look for other sync solutions :wacko:

Link to post
Share on other sites
  • 1 month later...

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.