Necromancing an old thread, because I have the same issue and it seems like many others do as well.
This issue persists in Moodle Version 4.5.4+ (Build: 20250417).
I have a 11.1KB backup of a template course made on the same server, it only contains an empty announcements form, 12 sections, 11 assignments, and one text block.
I started the restore at 11:07 AM and I think it actually was just in the task queue for a SUPER long time! I actually think the issue might be with the task queue system. In `/admin/tasklogs.php` after I saw that the restore was successful at 11:30 AM I see
> Asynchronous restore task
> \core\task\asynchronous_restore_task
> Duration: 5.22 secs
So it seems like the actual restore took 5 seconds and it was in the task log for ~30 minutes! The task log has many many events every second, most of them 0-0.1 seconds in duration.
Maybe this could help diagnose it. If I can, I'll try to make the queue smaller, but I don't know how!
by Joel Peltonen.