diff --git a/app/classes/models/management.py b/app/classes/models/management.py index b089df70..887b2d27 100644 --- a/app/classes/models/management.py +++ b/app/classes/models/management.py @@ -357,7 +357,7 @@ class helpers_management: @staticmethod def get_excluded_backup_dirs(server_id: int): - excluded_dirs = Backups.select(Backups.excluded_dirs).where(Backups.server_id == server_id).execute() + excluded_dirs = helpers_management.get_backup_config(server_id)['excluded_dirs'] dir_list = excluded_dirs.split(",") return dir_list diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index dec37d8a..06d6b453 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -571,7 +571,7 @@ class Server: f" (ID#{self.server_id}, path={self.server_path}) at '{backup_filename}'") tempDir = tempfile.mkdtemp() - shutil.copytree(self.server_path, tempDir) + shutil.copytree(self.server_path, tempDir, dirs_exist_ok=True) excluded_dirs = management_helper.get_excluded_backup_dirs(self.server_id) server_dir = helper.get_os_understandable_path(self.settings['path'])