Linux Config File


Recommended Posts

Hello,

how can I set up a config file under linux to change the folder_rescan_interval? First dump a sample config file with btsync-core --dump-sample-config and then? I still want to use the web interface.

How can I set this file as the default config file? Or is there any other way to change that interval?

Kind Regards

Link to comment
Share on other sites

here is an example

{   "device_name": "example.net",  "listening_port" : 1234,                       // 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" : "/home/btsync/data/",  "folder_rescan_interval": 300,}
To start the daemon, use

/home/btsync/bin/btsync --config /path/to/btsync.conf
I use supervisor to monitor btsync process. So I start with

/home/btsync/bin/btsync --config /path/to/btsync.conf --nodaemon
because supervisor already has daemon support.
Link to comment
Share on other sites

Not complete actually. you can use "folder_rescan_interval" from config files, and folder settings still come from web UI.

 

But my btsync is fully configured at the moment via debconf. Can't I change only this parameter now without losing all my other settings? Starting btsync with a custom config file makes it use completely new settings.

Link to comment
Share on other sites

And is there any way I can keep my current Web UI settings and just change that single parameter? Can't be that hard to accomplish...

 

 

I think you'll find if you only put the settings you need in the config file, the other settings will remain untouched. Also, the new settings will be stored in the internal config that Sync maintains and you won't have to use the config file each time.

Link to comment
Share on other sites

I think you'll find if you only put the settings you need in the config file, the other settings will remain untouched. Also, the new settings will be stored in the internal config that Sync maintains and you won't have to use the config file each time.

 

Ok, I think I got my interval changed to 43200 seconds which is half a day. At least the settings.dat file that I just found shows that. But even after a reboot btsync is constantly indexing all the folders, never letting my external hard drive spin down. I can't sleep at night! :( Any idea?

Link to comment
Share on other sites

@suchusernamemuchcreative

 

Please use this python script to set some particular value. Run it with next params:

settings.dat set folder_rescan_interval <your_value>

Script is experimental, so use with care and backup your settings.dat first.

 

What makes you think that it is indexing files all the time? Also, how many files and folders do you actually have there?

Link to comment
Share on other sites

@suchusernamemuchcreative

 

Please use this python script to set some particular value. Run it with next params:

settings.dat set folder_rescan_interval <your_value>

Script is experimental, so use with care and backup your settings.dat first.

 

What makes you think that it is indexing files all the time? Also, how many files and folders do you actually have there?

 

Thanks! It ran successfully. Viewing the settings.dat file now shows the value I entered (I tried 43201 just to be sure it took the value). But after a reboot btsync still rescans the folders every ~5 minutes. I can hear my drive spin up and btsyncs shows "Indexing" in the status column. I have 9 folders (all on the external drive) with about 190GiB of data. Btsync appears to always begin indexing with the same folder of 130GiB but then indexes other folders, too. There are no system files on the drive so it must be btsync causing it to spin up. Also it starts to show "Indexing" right when it spins up.

Link to comment
Share on other sites

@suchusernamemuchcreative

The unit is Mb. So, 500 means 500 Mb.

For the blank UI - it is a known issue, will be fixed very soon. As a workaround - set the "webui_local_storage" in settings.dat to empty string ("") - it should fix your blank UI. Note that Sync shouldn't be running when you modify settings.dat.

Link to comment
Share on other sites

@suchusernamemuchcreative

It looks like the debug.txt is created in wrong directory, not the one Sync is using to store DB.

 

How do you run Sync? Command line / or some preinstalled package? If first - please share the command line, if it contains config - please share config as well.

Link to comment
Share on other sites

I installed this http://forum.bittorrent.com/topic/28106-linux-desktop-gui-unofficial-packages-for-bittorrent-sync/ and now it updates and starts automatically. No separate config file I start it with. I just tried to locate the *.db files (like in windows?) and couldn't find them. That is the folder I should put the debug.txt into, right?

 

You should really embed a lot more options in the web UI!

Link to comment
Share on other sites

@suchusernamemuchcreative

Oh, okay then. I don't remember exact path where the package stores the data, but there is a simple way to find that out. Once you've started sync, run the command:

 

ps aux | grep sync

 

And one of process displayed will be started with --config <path_to_config> parameter. Look into this config file - it will contain the preference "storage_path" which indicates where DBs are stored and where you need to put the debug.txt (and actually get the log).

Link to comment
Share on other sites

Ok, thanks. That worked fine. When starting btsync via

/etc/init.d/btsync start

it gives me

[ ok ] Autostarting btsync instance 'debconf-default':.

Sounds like it always uses the default debconf settings instead of the settings I set up in the settings. dat file. So I tried changing the default debconf file (even though it clearly says I you shouldn't do that, as it will reset itself after an update) and it works. Btsync stopped indexing my files all the time. But how can I make this permanent? Is there a line in the startup script I can change to use the settings.dat instead of the debconf default config file? By the way, logging works now, but doesn't seem to contain any unusual activity as far as I can tell...

Link to comment
Share on other sites

Ok, thanks. That worked fine. When starting btsync via

/etc/init.d/btsync start

it gives me

[ ok ] Autostarting btsync instance 'debconf-default':.

Sounds like it always uses the default debconf settings instead of the settings I set up in the settings. dat file.

 

I believe the correct way to adjust settings for the packaged version is to use the dpkg-reconfigure command. This will allow you to adjust options that weren't available during the initial install.

Link to comment
Share on other sites

I believe the correct way to adjust settings for the packaged version is to use the dpkg-reconfigure command. This will allow you to adjust options that weren't available during the initial install.

 

Yeah, I tried it already with the --priority=high argument though. I misunderstood it and I should've used low priority. Now it asked me to enter the rescan interval. So the problem seems to be resolved. Thanks! :)

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.