Thanks Ken and Colin for your replies. My server is an Ubuntu machine on Amazon AWS. The OS was recently updated which also updated the postgresdatabase and the PHP to very recent versions. Incidentally, that very upgrade also caused some troubles with this moodle which I mentioned in this thread: https://moodle.org/mod/forum/discuss.php?d=227190
At the moment I don't have access to the machine but as soon as I can I will copy and paste here some of the details from a phpinfo(). I have in the past tried playing around with various settings in the php.ini like increasing the max file size and stretching time outs. I have also tried to backup just one quiz at a time. I will try and turn on some more debugging as well and post the results here.
I mentioned earlier that I can not do XML exports of the question bank but I can now add that I can actually do so of every category apart from the one that houses the questions for the first quiz. I suspect part of the problem lies in this quiz. Today while tinkering about on a mirrored copy of the install, I decided to delete this quiz completely. The breakthrough is that now the backup at least terminates (after ages) but displays: "Can not read file, either file does not exist or there are permission problems".
I think Colin's piecemeal concept is looking like my best bet but I wish I knew exactly what to do. Do you think that just copying the contents of the quiz tables will do the trick?... That is assuming that those users exist in the new install as well. I do indeed have PGAdmin which is what I use most of the time. I could indeed do some selective copies using that.
It doesn't look like the database has anything duplicated inside, but I am not really too sure how to check whether something is not right. It is definitely doing something very weird. I was just looking at some old backups, and only 5 months ago the size of a plain text dump was only 250MB. This seems to have grow exponentially since then.