Skip to content

Commit 98c0530

Browse files
authored
Update __init__.py
Added additional definitions to allow access to client file and image backups through the API.
1 parent 42a287d commit 98c0530

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

urbackup_api/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,22 @@ def start_incr_image_backup(self, clientname):
416416
def start_full_image_backup(self, clientname):
417417
return self._start_backup(clientname, 'full_image');
418418

419+
def get_clientimagebackups(self, clientid = 0):
420+
if not self.login():
421+
return None
422+
423+
backups = self._get_json("backups", { "sa": "backups", "clientid": clientid })
424+
425+
return backups["backup_images"]
426+
427+
def get_clientbackups(self, clientid = 0):
428+
if not self.login():
429+
return None
430+
431+
backups = self._get_json("backups", { "sa": "backups", "clientid": clientid })
432+
433+
return backups["backups"]
434+
419435
def add_extra_client(self, addr):
420436
if not self.login():
421437
return None

0 commit comments

Comments
 (0)