I hate to jump in on such an old thread, but I too have some observations regarding the slow restoring of courses.
As others have observed, increasing the the session timeout period certainly helps, however, when a restore takes up to 4 hrs to complete I think there is an issue that needs to be addressed.
Yesterday I was restoring a course, and after 2 and 1/2 hours I decided to have have a look at the restoring course to see how far it had gotten. It had successfully restored about 1/20th of the course content (very disappointing). Then I thought that I would have a look at the question bank to see how that was going, and I could see that it had restored every single question in the course. Strange I thought as others have indicated that the question banks seem to be the reason the restores are going so slowly.
I let the restore run for another hour, but nothing else happened, so I killed the page and deleted the restored course.
I tried again, but this time, I only backed up one topic from the course, and then restored from this. This time the restore took about an hour, and successfully completed. When I checked the question bank this time, once again, all of the quiz questions were there. I thought that this was strange, as I only backed up the first topic in the course, which only accounts for about 1/10th of the question bank.
Could this be part of the problem?
Should the backups back up all quiz questions even when they are from quizzes that aren't being included in the back up.
Using Moodle 2.6.3