by Jim Johnson.
I just fixed *our* issue, which was the restore/backup/import/duplicate/whatever would stall/process pending only when we included questions & question banks in the backups/restore.
Once we stopped including the question banks, the backup & restore & import & duplicate functions worked perfectly.
It took me two days of reading many moodle posts to figure this out.
To stop the process pending, I went to moodledata/temp/ and deleted everything *mostly the backup folder* and in moodledata/lock/ deleted that folder, also purged all caches ; we restarted our server and killed the mysql connections, restarted again and waited 24 hours. We then went to admin/tools/scheduled tasks and admin/tasks running (admin/tool/task/runningtasks.php). I also ran from cli php admin/cli/adhoc_task.php --execute
The backups & restores with questions in them randomly finished incorrectly over the 24 hours by themselves and we no longer restore courses with question banks. It's a hassle but we download the .gfts and rebuild the quizzes each time.
Once we stopped including the question banks, the backup & restore & import & duplicate functions worked perfectly.
It took me two days of reading many moodle posts to figure this out.
To stop the process pending, I went to moodledata/temp/ and deleted everything *mostly the backup folder* and in moodledata/lock/ deleted that folder, also purged all caches ; we restarted our server and killed the mysql connections, restarted again and waited 24 hours. We then went to admin/tools/scheduled tasks and admin/tasks running (admin/tool/task/runningtasks.php). I also ran from cli php admin/cli/adhoc_task.php --execute
The backups & restores with questions in them randomly finished incorrectly over the 24 hours by themselves and we no longer restore courses with question banks. It's a hassle but we download the .gfts and rebuild the quizzes each time.