I agree with Howard except to suggest attempting to restore the contexts by dropping the mdl_context table then restoring just this table from a recent (< 24 hours before the accident) backup. If you're using MySQL or MariaDB this should be possible. If you first restore this database to another temporary location you can check if this contains the missing id values (1807519, etc.).
If there have been subsequent changes to the site then this restored table may be missing some new contexts. You could modify the backup before restoring it to add any new records. Again, assuming MySQL/MariaDB, then the backups are text files that can be edited so you could take bulk of the mdl_context rows from the pre-accident backup and add any additional rows from a backup of the "broken" site, and restore from this combined file.
This is to specifically fix the "Can't find data record in database table context" errors, you may find there are other issues that need repairing.