def Start(jobName): res = subproccall(["veeamconfig", "job", "start", "--name", jobName]) sessionId = None lines = res.split('\n') for ln in lines: if ln.find("Session ID:") != -1: first = ln.find("{") last = ln.find("}") sessionId = ln[first:last + 1] return [res, sessionId]
def DetailInfo(id): return subproccall(["veeamconfig", "job", "info", "--id", id])
def List(): return subproccall(["veeamconfig", "job", "list"])
def Delete(jobName): return subproccall(["veeamconfig", "job", "delete", "--name", jobName])
def NewFileBackup(jobName, repoName, includeDirs): return subproccall([ "veeamconfig", "job", "create", "fileLevel", "--name", jobName, "--repoName", repoName, "--includeDirs", includeDirs ])
def NewVolumeBackup(jobName, repoName, devices): ''' devices - is a comma separated name of devices or mount points or ...''' return subproccall([ "veeamconfig", "job", "create", "--name", jobName, "--repoName", repoName, "--objects", devices ])
def List(): return subproccall(["veeamconfig", "backup", "list"])
def Mount(id, dir): return subproccall( ["veeamconfig", "backup", "mount", "--id", id, "--mountDir", dir])