Can't get backups for some courses

Can't get backups for some courses

by Josep M. Fontana -
Number of replies: 8
I had posted this in the backup and restore forum but I didn't get any response. Since this is urgent, I'm posting it here to see if someone can lend us a hand

We are having a strange problem. While most of the courses on our site are backed up automatically, I've noticed that some aren't. There isn't even a 'backupdata' folder in the folder structure associated to the course. When I attempt to do a manual backup, I get the following error message:

"Cannot quickly initialize page: empty course id"

Can anybody help us out? We need to make a backup copy of the course urgently to be able to restore it without user data for the start of the next quarter.

I don't know whether this can give some clue to somebody to help us solves the problem but the process always stops at the same point:

  • Writing course data

    Cannot quickly initialize page: empty course id
     
We are using version Moodle 1.5.3+ (2005060230)

Josep M
Average of ratings: -
In reply to Josep M. Fontana

Re: Can't get backups for some courses

by Maik Riecken -
Please check out the values for memory_limit and max_execution_time in your php.ini. Try to increase both. In mnost cases problems with backup function have something to do with one or two very big files in the coursedirectory at /moodledata. Zip-Files could be problematic also. You can test it by backupping with course files. If it works it is the problem I described before.

regards,

Maik
In reply to Maik Riecken

Re: Can't get backups for some courses

by Josep M. Fontana -
Wow! This is indeed a rapid response! smile Thanks a lot, indeed, Maik.

I think you must have meant to say "test it by backupping *without* the course files", though. Right? That's what I understand. If it backs up without the course file, it will mean that the problem is caused by the size of one of the course files.

I'll try that.

Josep M.
In reply to Maik Riecken

Re: Can't get backups for some courses

by Josep M. Fontana -
Actually, it didn't work. I attempted a backup deactivating 'course files' and I'm still getting the same error message. The process still stops in Writing Course data > blocks. What is strange (to me, that is) is the reference to the empty course ID. Why would that interfere with anything if having a course ID in the course settings is optional?

Josep M.
In reply to Josep M. Fontana

Re: Can't get backups for some courses

by Mauno Korpelainen -

In Finnish Forum there was one case where this problem was solved by leaving quiz-activities outside backup. I have never had this problem myself but you could try that.

The problem was that there was a question in database where the 'questiontype' column was set to something that is not a recognised question type and backup was not done

In reply to Josep M. Fontana

Re: Can't get backups for some courses

by Mauno Korpelainen -
Can you make a backup of your database using phpMyAdmin or some mysql dump program? If you check (sql)backupfile with notepad there might be some extra signs like ' or ´ that could be the reason for this behaviour. It just came to my mind that some non-standard block or module in course might be problematic too.
In reply to Josep M. Fontana

Re: Can't get backups for some courses

by Michael Penney -
Is this all standard 1.5.3 code?
In reply to Michael Penney

Re: Can't get backups for some courses

by Josep M. Fontana -
Mmm, it couldn't be caused by quizzes because there were none in the courses that are giving us problems.

As to whether everything is standard, well no. And I think now we are getting into something. I notice that in the courses that cannot be backed up there are some activities for which there is only the icon and no title. I don't recall this being like this when the courses were created. When I try to edit it, I get the following message: "The required instance of this module doesn't exist".

The icons are for two non-standard modules. One is dfwiki and the other is a question mark (I guess it must be 'feedback').

What I've done is delete all the activities that had only the icon but no text and then I got the following message "The required instance of this module didn't exist. Module deleted."

After all the problematic activities have been deleted, THE COURSE CAN INDEED BE BACKED UP!

I don't know what could have been the problem since these courses were build already a year ago and both dfwiki and feedback are installed and there are unproblematic activities using these modules. I'm curious to know the explanation for this but right now I'm happy enough to have solved the problem. Thanks a lot for your help Mauno and Michael!

Josep M.
In reply to Josep M. Fontana

Re: Can't get backups for some courses

by Richard Cory -
I'm running 1.71.and have the same problem ... backed up fine for a while

I deleted the feedback activity and block but two other error messages occurred:
===========

On the backup details page:

Include Quizzes with user data
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '45,27) AND t.id = g.question AND t.qtype = 'random' ' at line 5

SELECT t.id, t.category FROM mdl_quiz_question_instances g, mdl_question t WHERE g.quiz IN (,45,27) AND t.id = g.question AND t.qtype = 'random' AND t.questiontext = '1'

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

SELECT g.id, g.quiz FROM mdl_quiz_grades g WHERE g.quiz =

===========
During the backup page

Creating XML file
  • Writing header
  • Writing general info
Error: Invalid context creation request for level "70", instance "".

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

SELECT r.* FROM mdl_role_assignments ra, mdl_role r WHERE ra.roleid = r.id AND ra.contextid =

before:
Writing course data
Course info Metacourse Blocks
Cannot quickly initialize page: empty course id


-----------
thanks for any enlightenments
RC