I have another newer site to compare with, and this database has the BIGINT overall instead of INT.
So I manually changed all the mdl_backup_... tables. Everywhere the data type was INT I changed that to BIGINT.
Et voila! Now I can restore a course.
But leaves with with some questions.
Is this safe? If so, can anyone supply a sql command to alter all the INT data types to BIGINT.
Who knows what else should be changed to bring the database up-to-date.