fixes the check for deletion type as it is now .xz instead of .zip, reduces amount of days before deletion to 8. extended tar command to block most directories throwing permissions errors

This commit is contained in:
jenz
2023-03-02 12:47:57 +01:00
parent 272024d9f4
commit 948d74ec5d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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 -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_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' -cJf {zipname} {self.path}"
print("exec_command_state: ", exec_command_state)
subprocess.run([exec_command_state], shell=True)