Refresh Settings on Client

Is there a way to force a reload from the settings.cfg file on the client. I would like to program a piece of software that changes a few of the settings on the client however it seems like they never get reloaded. The main setting that I would like to change is Max Internet Speed. Thanks!

If you know a little bit of C++ you could adapt the command line client https://sourceforge.net/projects/urbackup/files/Misc/Commandline%20Client/0.11/ (new parameter like --load_settings file). The API is already there (untested) – updateSettings in Connector.h. I can do it as well, obviously.
Then you would be able to load the settings via calling “C:\Program Files\UrBackup\UrBackupClient_cmd.exe --load_settings filename.cfg”.

Ok, I didn’t think of that. I have just implemented a socket in my application that connects out on the command port to the service. Everything connects fine and I see a new connection in the debug.log, however it never processes the command that I send, it just times out. Is there a special character or terminating character that I need to send at the end of the command to begin processing the command? Thanks for your help!

You have to prepend the size of the message in binary (without the size part) berfore the messages.

I.e. the update settings message:

<size of message (4 bytes, little endian)>UPDATE SETTINGS <settings>#pw=<contents of C:\Program Files\UrBackup\pw.txt>

Thanks for the quick reply! I have gotten the commands to go through on a TCP socket however, I have having some issues with the UPDATE SETTINGS command. What can be used to separate the settings so I can pass through all the settings at once? Right now, I can only change one setting and it overwrites the whole settings.cfg with the single setting file. Thanks for your help!

Ok, so I did get the settings file saving with the \n character. The only issue that I am still having is that when a backup is happening and I change the max connection speed it doesn’t update the settings. I have to restart the service in order for these settings to get applied. If a backup isn’t happening, the settings are applied immediately. Is there a graceful way of resetting the settings and having them apply while a backup is running! Thanks for all your help!

Currently it only updates after a backup. Additionally it only sets the rate limit when it establishes a connection. Changing that might require a bit of work.