This might be 3 distinct bugs but they are all going to be similar root causes and all related:
core\task\course_backup_task,Can't find data record in database table course.
core\task\asynchronous_restore_task,Can't find data record in database table backup_controllers.
I suspect all are race conditions between a course being flagged for backup and something in the course changing which makes the async task corrupted. I think in all cases the backup should attempt to either gracefully recover as best it can and keep going, or it should catch certain known exceptions and just swallow them and let the adhoc task finished.