Skip to content

Commit 6a8a68e

Browse files
committed
add controller_backupdb api method
1 parent 6f79c05 commit 6a8a68e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

linstor/linstorapi.py

+14
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,20 @@ def controller_del_prop(self, key):
26992699
body
27002700
)
27012701

2702+
def controller_backupdb(self, backup_name):
2703+
"""
2704+
Backup controller database with the given backup_name.
2705+
2706+
:param str backup_name: Name the backup should have.
2707+
:return: A list containing ApiCallResponses from the controller.
2708+
:rtype: list[ApiCallResponse]
2709+
"""
2710+
self._require_version("1.13.0", msg="Backup DB is not support by controller version")
2711+
body = {
2712+
"backup_name": backup_name
2713+
}
2714+
return self._rest_request("BackupDb", "POST", "/v1/controller/backup/db", body)
2715+
27022716
def controller_info(self):
27032717
"""
27042718
If connected this method returns the controller info string.

0 commit comments

Comments
 (0)