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
This commit is contained in:
xithical 2022-01-21 23:06:37 -06:00
parent 00c7af8d8b
commit 09aab2a250

View File

@ -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()