Skip to content

Commit 67bc6da

Browse files
committed
Compress backup tarballs with gzip
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
1 parent 5a4a59d commit 67bc6da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/resources/lib/modules/system.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ def do_backup(self, listItem=None):
542542
'',
543543
False,
544544
False,
545-
self.BACKUP_DESTINATION )
545+
self.BACKUP_DESTINATION,
546+
False )
546547

547548
if bckDir and os.path.exists(bckDir):
548549
# free space check
@@ -561,8 +562,8 @@ def do_backup(self, listItem=None):
561562
self.backup_dlg.create('LibreELEC', self.oe._(32375))
562563
if not os.path.exists(self.BACKUP_DESTINATION):
563564
os.makedirs(self.BACKUP_DESTINATION)
564-
self.backup_file = self.oe.timestamp() + '.tar'
565-
tar = tarfile.open(bckDir + self.backup_file, 'w')
565+
self.backup_file = self.oe.timestamp() + '.tar.gz'
566+
tar = tarfile.open(bckDir + self.backup_file, 'w:gz', compresslevel=1)
566567
for directory in self.BACKUP_DIRS:
567568
self.tar_add_folder(tar, directory)
568569
tar.close()

0 commit comments

Comments
 (0)