diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d834e8..d4ebfcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.9.31 (2026-03-05) + +- Support zip backup file archive format. + ## 0.9.30 (2026-02-03) - Support backup and restore schedules. diff --git a/python/mujinwebstackclient/version.py b/python/mujinwebstackclient/version.py index d2e8298..a9877ff 100644 --- a/python/mujinwebstackclient/version.py +++ b/python/mujinwebstackclient/version.py @@ -1,3 +1,3 @@ -__version__ = '0.9.30' +__version__ = '0.9.31' # Do not forget to update CHANGELOG.md diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index 233d3d6..5828990 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1070,7 +1070,24 @@ def DeleteAllITLPrograms(self, timeout=5): # Backup restore # - def Backup(self, saveconfig=True, savemedia=True, backupscenepks=None, backupSceneFormat=None, savewebapps=True, saveitl=True, savedetection=False, savestate=True, savecalibration=False, savedebug=False, saveeds=True, saveiodd=True, saveschedule=True, timeout=600): + def Backup( + self, + saveconfig=True, + savemedia=True, + backupscenepks=None, + backupSceneFormat=None, + savewebapps=True, + saveitl=True, + savedetection=False, + savestate=True, + savecalibration=False, + savedebug=False, + saveeds=True, + saveiodd=True, + saveschedule=True, + archiveFormat='tar.gz', + timeout=600, + ): """Downloads a backup file :param saveconfig: Whether we want to include configs in the backup, defaults to True @@ -1086,6 +1103,7 @@ def Backup(self, saveconfig=True, savemedia=True, backupscenepks=None, backupSce :param saveschedule: Whether we want to include schedules in the backup, defaults to True :param backupscenepks: List of scenes to backup, defaults to None :param backupSceneFormat: The scene format to use in backup files, defaults to None + :param archiveFormat: The backup file archive format, supported values are tar.gz and zip, defaults to tar.gz :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful :return: A streaming response to the backup file @@ -1108,6 +1126,7 @@ def Backup(self, saveconfig=True, savemedia=True, backupscenepks=None, backupSce 'schedule': 'true' if saveschedule else 'false', 'backupScenePks': ','.join(backupscenepks) if backupscenepks else None, 'backupSceneFormat': backupSceneFormat, + 'archiveFormat': archiveFormat, }, timeout=timeout, ) @@ -1115,7 +1134,19 @@ def Backup(self, saveconfig=True, savemedia=True, backupscenepks=None, backupSce raise WebstackClientError(response.content.decode('utf-8'), response=response.content) return response - def Restore(self, file, restoreconfig=True, restoremedia=True, restorewebapps=True, restoreitl=True, restoreeds=True, restoreiodd=True, restoreschedule=True, timeout=600): + def Restore( + self, + file, + restoreconfig=True, + restoremedia=True, + restorewebapps=True, + restoreitl=True, + restoreeds=True, + restoreiodd=True, + restoreschedule=True, + archiveFormat=None, + timeout=600, + ): """Uploads a previously downloaded backup file to restore :param file: Backup filer in tarball format @@ -1126,6 +1157,7 @@ def Restore(self, file, restoreconfig=True, restoremedia=True, restorewebapps=Tr :param restoreeds: Whether we want to restore the eds files, defaults to True :param restoreiodd: Whether we want to restore the iodd files, defaults to True :param restoreschedule: Whether we want to restore the schedules, defaults to True + :param archiveFormat: The backup file archive format, supported values are tar.gz and zip, defaults to None :param timeout: Amount of time in seconds to wait before failing, defaults to 600 :raises WebstackClientError: If request wasn't successful :return: JSON response @@ -1142,6 +1174,7 @@ def Restore(self, file, restoreconfig=True, restoremedia=True, restorewebapps=Tr 'eds': 'true' if restoreeds else 'false', 'iodd': 'true' if restoreiodd else 'false', 'schedule': 'true' if restoreschedule else 'false', + 'archiveFormat': archiveFormat, }, timeout=timeout, )