Skip to content

Commit c3a8d37

Browse files
committed
Add Backup browse function
1 parent db62086 commit c3a8d37

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

urbackup_api/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,19 @@ def get_clientbackups(self, clientid = 0):
447447
backups = self._get_json("backups", { "sa": "backups", "clientid": clientid })
448448

449449
return backups["backups"]
450+
451+
def get_backup_content(self, clientid, backupid, path = "/"):
452+
if not self.login():
453+
return None
454+
455+
content = self._get_json("backups", {
456+
"sa": "files",
457+
"clientid": clientid,
458+
"backupid": backupid,
459+
"path": path
460+
})
461+
462+
return content["files"]
450463

451464
def get_groups(self):
452465
if not self.login():

0 commit comments

Comments
 (0)