From 09aab2a2505bfbdb8565d403047eae76f1f222e7 Mon Sep 17 00:00:00 2001 From: xithical Date: Fri, 21 Jan 2022 23:06:37 -0600 Subject: [PATCH] Add path to server backup log notification Adds the server path that is being passed to `shutil` to the log entry for backups to more easily identify cases where backups loops are occurring --- app/classes/shared/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index ea4af70a..7723caf8 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -516,7 +516,7 @@ class Server: conf = management_helper.get_backup_config(self.server_id) try: backup_filename = "{}/{}".format(self.settings['backup_path'], datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S')) - logger.info("Creating backup of server '{}' (ID#{}) at '{}'".format(self.settings['server_name'], self.server_id, backup_filename)) + logger.info("Creating backup of server '{}' (ID#{}, path={}) at '{}'".format(self.settings['server_name'], self.server_id, self.server_path, backup_filename)) shutil.make_archive(helper.get_os_understandable_path(backup_filename), 'zip', self.server_path) while len(self.list_backups()) > conf["max_backups"] and conf["max_backups"] > 0: backup_list = self.list_backups()