mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
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:
parent
00c7af8d8b
commit
09aab2a250
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user