diff --git a/archive/v1/src/tasks/backup.py b/archive/v1/src/tasks/backup.py index ff48d0e896..45b0266339 100644 --- a/archive/v1/src/tasks/backup.py +++ b/archive/v1/src/tasks/backup.py @@ -320,8 +320,11 @@ async def execute_backup(self, session: AsyncSession) -> Dict[str, Any]: export_data["tables"]["pose_detections_recent"] = pose_data # Write compressed JSON - with gzip.open(backup_path, 'wt', encoding='utf-8') as f: - json.dump(export_data, f, indent=2, default=str) + def _write_json_sync(): + with gzip.open(backup_path, 'wt', encoding='utf-8') as f: + json.dump(export_data, f, indent=2, default=str) + + await asyncio.to_thread(_write_json_sync) backup_size_mb = self._get_file_size_mb(backup_path)