From 35d8c4fa79e36f4c67e203ac920607ef59879471 Mon Sep 17 00:00:00 2001 From: "ran.liao" Date: Thu, 5 Mar 2026 10:12:27 +0900 Subject: [PATCH 1/4] add archive format parameter --- CHANGELOG.md | 4 ++++ python/mujinwebstackclient/version.py | 2 +- python/mujinwebstackclient/webstackclient.py | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) 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..5c950da 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1070,7 +1070,7 @@ 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 +1086,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 +1109,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 +1117,7 @@ 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='tar.gz', timeout=600): """Uploads a previously downloaded backup file to restore :param file: Backup filer in tarball format @@ -1126,6 +1128,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 tar.gz :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 +1145,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, ) From df74b0f64f9012bf3c0737a287ff5d7cf731f062 Mon Sep 17 00:00:00 2001 From: "ran.liao" Date: Fri, 6 Mar 2026 09:39:04 +0900 Subject: [PATCH 2/4] change default archive format to None --- python/mujinwebstackclient/webstackclient.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index 5c950da..bd31354 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1070,7 +1070,7 @@ 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, archiveFormat='tar.gz', 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=None, timeout=600): """Downloads a backup file :param saveconfig: Whether we want to include configs in the backup, defaults to True @@ -1086,7 +1086,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 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: A streaming response to the backup file @@ -1117,7 +1117,7 @@ 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, archiveFormat='tar.gz', 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 @@ -1128,7 +1128,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 tar.gz + :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 From cc41abae0b6e18602e41c17c99a771f14f6687fa Mon Sep 17 00:00:00 2001 From: Barkin Simsek Date: Wed, 11 Mar 2026 07:52:23 +0900 Subject: [PATCH 3/4] Run ruff formatter. --- python/mujinwebstackclient/webstackclient.py | 33 ++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index bd31354..be58af0 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, archiveFormat=None, 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=None, + timeout=600, + ): """Downloads a backup file :param saveconfig: Whether we want to include configs in the backup, defaults to True @@ -1117,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, archiveFormat=None, 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 From a94ca7734c179e51924cc739c1131f4adaa3cf2a Mon Sep 17 00:00:00 2001 From: Barkin Simsek Date: Wed, 11 Mar 2026 07:54:56 +0900 Subject: [PATCH 4/4] Revert to defaulting to tar.gz for creating backups. --- python/mujinwebstackclient/webstackclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mujinwebstackclient/webstackclient.py b/python/mujinwebstackclient/webstackclient.py index be58af0..5828990 100644 --- a/python/mujinwebstackclient/webstackclient.py +++ b/python/mujinwebstackclient/webstackclient.py @@ -1085,7 +1085,7 @@ def Backup( saveeds=True, saveiodd=True, saveschedule=True, - archiveFormat=None, + archiveFormat='tar.gz', timeout=600, ): """Downloads a backup file @@ -1103,7 +1103,7 @@ def Backup( :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 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