Windows command for adding discovery IP/hostname?

I have URBackup server installed on a windows server and I am using it to backup Windows 7 workstations. Is there a command line way to add a discovery IP hint to the server? This way I dont have to manually add a client each time.

Thanks!

By installing the client on a machine, it should seek out your server automatically - it just may take a while.

I can think of one way to automate this, but I don’t know how it will turn out.

Copy the server_idents.txt and new_server_idents.txt from a client that has already joined your server and push out the client installer via GPO. After installing the client, move the two files into place, and restart the service.

As far as internet clients… I think just setting up the internet section on the client will work.

You could use the command line client here: https://github.com/uroni/urbackup-server-python-web-api-wrapper or directly add it to backup_server.db with the sqlite shell.

import urbackup_api

server = urbackup_api.urbackup_server("http://127.0.0.1:55414/x", "admin", "foo")

server.add_extra_client("1.1.1.1")

Awesome I will try that!

@uroni I have no python experience but this may be the push I need to start using it. Looks like a great tool to automate this.

So what I did was create a small python script that accepts the hostname or IP as an argument. Keep in mind I dont know python so there is probably a better way to do this. I named the script addclient.py.


import urbackup_api
import sys

server = urbackup_api.urbackup_server(“http://hostname:55414/x”, “admin”, “password”)
server.add_extra_client(sys.argv[1])

Now I can call python from within a Powershell script after I deploy the urbackup client such as:
python c:\scripts\addclient.py hostname