From bde1fa532a613ab7b8f55c18a5d105b0acef4292 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Wed, 24 Dec 2025 05:12:28 -0500 Subject: [PATCH] system.py: compress backup files with zstd Signed-off-by: Ian Leonard --- resources/lib/modules/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/modules/system.py b/resources/lib/modules/system.py index 4a64a579c..52463966a 100644 --- a/resources/lib/modules/system.py +++ b/resources/lib/modules/system.py @@ -564,9 +564,9 @@ def do_backup(self, listItem=None): self.backup_dlg.create('LibreELEC', oe._(32375)) if not os.path.exists(self.BACKUP_DESTINATION): os.makedirs(self.BACKUP_DESTINATION) - self.backup_file = f'{hostname.get_hostname()}-{oe.timestamp()}.tar' + self.backup_file = f'{hostname.get_hostname()}-{oe.timestamp()}.tar.zst' log.log(f'Backup file: {bckDir + self.backup_file}', log.INFO) - tar = tarfile.open(bckDir + self.backup_file, 'w', format=tarfile.GNU_FORMAT) + tar = tarfile.open(bckDir + self.backup_file, mode='w:zst', level=3, format=tarfile.GNU_FORMAT) for directory in self.BACKUP_DIRS: self.tar_add_folder(tar, directory) if self.backup_dlg is None or self.backup_dlg.iscanceled():