"I have tried to backup a course and it stops at about 95% and throws the error "Error reading from database". I can turn on debugging, but a stupid question: where do I access the created error logs so that I can upload them here?"
Debugging output if set to developer (which is max) should display to the screen. Fact that the error says 'reading from database', suggest to me that the shared hosting plan you have isn't allowed to complete the job. I'll say it again ... check with hosting provider about the details ... maxes ... your shared package/server will allow for all customers on that single system.
In moodledata/temp/backup/ there might be a .log file *like* (not exactly):
91dd4c4875a77ff2ac028cd3811f90ec.log
If the file is 0 bytes in size that course backup was successful. If the file is larger than 0 bytes it will have a running log of the entire backup process, but it will not be useful ... other than to show at what stage in the plan to backup failed - if 700 is the highest number you see in that log ... it did not succeed (duh!) ... succesful plans reach 1000 ... and the log file will show 0 bytes in size.
There is also evidence of a failed backup that actually might have completed but could not complete the very last step - which is to *copy* (not move) the backup file to the sea of files in filedir of moodledata. The *copy* command might actually spike resources your shared hosting plan is allowed to use.
Evidence is a long directory name: *like* 91dd4c4875a77ff2ac028cd3811f90ec.
if you look in there and see a .mbz file then the backup failed at the very last stage ... which is copying the backup.mbz file to the sea of files in /moodledata/filedir/
*** IF on a shared plan *** it could be you cannot change nor go over maximums set on your account because of the package purchased. Some of those maximums might be time for a php script to run ... default is 30 seconds in php ... others might be memory a script can consume. In the actual code of the backup routine, Moodle attempts to get 128 Megs more memory to do the backup.
*** IMPORTANT *** if Moodle cannot acquire the memory or time needed and you cannot set those variables beyond what you package purchased set no amount of tweaking/cussing/begging with Helpdesk folks will help.
Those 'dirty little secrets' can usually be found in customer forums (to which the the public does not have access). Have seen helpdesk folks from providers expose those maxes. And, of course, recommend to the user upgrading from 'shared hosting' to a VPS so that you, the op, can set higher parameters an run higher versions of Moodle.
You can go down rabbit holes pretty easily following advice based upon no knowledge of un-known setups.
'spirit of sharing', Ken