Update __init__.py

Added additional definitions to allow access to client file and image backups through the API.
This commit is contained in:
mwubbema 2018-05-31 09:46:49 +02:00 committed by GitHub
parent 42a287d23a
commit 98c053010d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,6 +416,22 @@ class urbackup_server:
def start_full_image_backup(self, clientname):
return self._start_backup(clientname, 'full_image');
def get_clientimagebackups(self, clientid = 0):
if not self.login():
return None
backups = self._get_json("backups", { "sa": "backups", "clientid": clientid })
return backups["backup_images"]
def get_clientbackups(self, clientid = 0):
if not self.login():
return None
backups = self._get_json("backups", { "sa": "backups", "clientid": clientid })
return backups["backups"]
def add_extra_client(self, addr):
if not self.login():
return None