From f79327a11f6b0b7a5843280ea5a7b8871aac8459 Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 7 May 2023 18:55:34 +0200 Subject: [PATCH] excluding compressing itself --- file_mover/remote_sftp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_mover/remote_sftp.py b/file_mover/remote_sftp.py index a4371cf4..5f4e6535 100755 --- a/file_mover/remote_sftp.py +++ b/file_mover/remote_sftp.py @@ -51,7 +51,7 @@ class sftp_remote: #-T3= 3 threads, use 70% of available ram if 'tar_recursive' == command_state: - exec_command_state = f"XZ_OPT='-T3 --memlimit-compress=70%' tar -cJf {zipname} {self.path}" + exec_command_state = f"XZ_OPT='-T3 --memlimit-compress=70%' tar --exclude={zipname} -cJf {zipname} {self.path}" elif 'mysqldump' == command_state: #check README for my.cnf regarding how this works exec_command_state = f'mysqldump -u root --all-databases > mysqldump.sql'