From e2e0a0829b09e59fd4c129f5c66612009b87b636 Mon Sep 17 00:00:00 2001 From: jenz Date: Sun, 14 May 2023 13:11:59 +0200 Subject: [PATCH] ignoring failed files that might have changed during tar --- file_mover/remote_local_dir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_mover/remote_local_dir.py b/file_mover/remote_local_dir.py index 23eecd9e..ade303e0 100755 --- a/file_mover/remote_local_dir.py +++ b/file_mover/remote_local_dir.py @@ -36,7 +36,7 @@ class local_dir_remote: source_files = self.list_dir(True) zipname = f'{job["zipname"]}-{str(datetime.now()).split(" ")[0]}.tar.xz' #-T3 = 3 threads, the backups are meant to run in the night at 5 am to not interfere with players. - exec_command_state = f"XZ_OPT='-T3 --memlimit-compress=70%' tar --exclude='/home/gameservers/.python_history' --exclude='/home/gameservers/.cache' --exclude='/home/gameservers/css_mg/cstrike/demos' --exclude='/home/gameservers/css_mg/cstrike/download' --exclude='/home/gameservers/css_mg/cstrike/addons/sourcemod/data' --exclude='/home/gameservers/css_jb/cstrike/logs' --exclude='/home/gameservers/css_jb/cstrike/download' --exclude='/home/gameservers/css_jb/cstrike/downloadlists' --exclude='/home/gameservers/css_ze/cstrike/download' --exclude='/home/gameservers/css_ze/cstrike/maps' --exclude='/home/gameservers/css_2_ze/cstrike/maps' --exclude='/home/gameservers/css_zr/cstrike/maps' --exclude='/home/gameservers/css_mg/cstrike/maps' --exclude='/home/gameservers/css_gg/cstrike/maps' --exclude='/home/gameservers/css_jb/cstrike/maps' --exclude='/home/gameservers/css_2_ze/cstrike/download' --exclude='/home/gameservers/css_dev/cstrike/download' --exclude='/home/gameservers/css_2_ze/cstrike/addons/sourcemod/data' --exclude='/home/gameservers/svencoop/svencoop/logs' --exclude='/home/gameservers/css_gg/cstrike/logs' --exclude='/home/gameservers/css_gg/cstrike/download' --exclude='/home/gameservers/css_gg/cstrike/downloadlists' --exclude='/home/gameservers/css_mg_dev/cstrike/demos' --exclude='/home/gameservers/css_mg_dev/cstrike/download' --exclude='/home/gameservers/css_zr/cstrike/download' --exclude='/home/gameservers/svencoop/svencoop_addon/maps' -cJf {zipname} {self.path}" + exec_command_state = f"XZ_OPT='-T3 --memlimit-compress=70%' tar --exclude='/home/gameservers/.python_history' --exclude='/home/gameservers/.cache' --exclude='/home/gameservers/css_mg/cstrike/demos' --exclude='/home/gameservers/css_mg/cstrike/download' --exclude='/home/gameservers/css_mg/cstrike/addons/sourcemod/data' --exclude='/home/gameservers/css_jb/cstrike/logs' --exclude='/home/gameservers/css_jb/cstrike/download' --exclude='/home/gameservers/css_jb/cstrike/downloadlists' --exclude='/home/gameservers/css_ze/cstrike/download' --exclude='/home/gameservers/css_ze/cstrike/maps' --exclude='/home/gameservers/css_2_ze/cstrike/maps' --exclude='/home/gameservers/css_zr/cstrike/maps' --exclude='/home/gameservers/css_mg/cstrike/maps' --exclude='/home/gameservers/css_gg/cstrike/maps' --exclude='/home/gameservers/css_jb/cstrike/maps' --exclude='/home/gameservers/css_2_ze/cstrike/download' --exclude='/home/gameservers/css_dev/cstrike/download' --exclude='/home/gameservers/css_2_ze/cstrike/addons/sourcemod/data' --exclude='/home/gameservers/svencoop/svencoop/logs' --exclude='/home/gameservers/css_gg/cstrike/logs' --exclude='/home/gameservers/css_gg/cstrike/download' --exclude='/home/gameservers/css_gg/cstrike/downloadlists' --exclude='/home/gameservers/css_mg_dev/cstrike/demos' --exclude='/home/gameservers/css_mg_dev/cstrike/download' --exclude='/home/gameservers/css_zr/cstrike/download' --exclude='/home/gameservers/svencoop/svencoop_addon/maps' --ignore-failed-read -cJf {zipname} {self.path}" print("exec_command_state: ", exec_command_state) subprocess.run([exec_command_state], shell=True)