Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: course restore error ( The backup file contains more than one top-level question categories for context 674830.) - moved

$
0
0
by Ken Task.  

In an extracted backup directory there are .xml files that relate to things like files, resources, etc.  

Examples:

-rw-r--r--. 1 root root  793635 May 29 17:50 questions.xml

At the top of above file:

<?xml version="1.0" encoding="UTF-8"?>
<question_categories>
  <question_category id="1">
    <name>top</name>
    <contextid>126</contextid>
    <contextlevel>50</contextlevel>
    <contextinstanceid>12</contextinstanceid>
    <info></info>
    <infoformat>0</infoformat>
    <stamp>site+180907081818+PqQpnN</stamp>
    <parent>0</parent>
    <sortorder>0</sortorder>
    <questions>
    </questions>
  </question_category>

Then, under the above which appears to define categories ...

  <question_category id="2">
    <name>Default for Skill Check 1</name>
    <contextid>129</contextid>
    <contextlevel>70</contextlevel>

Directory related ... activities ... contained there in ... as per example:

[root@server activities]# ls -d quiz*

[root@sos activities]# ls -d quiz*
quiz_102  quiz_107  quiz_112  quiz_116  quiz_73  quiz_78  quiz_83  quiz_91  quiz_95  quiz_98 quiz_103  quiz_108  quiz_113  quiz_72   quiz_77  quiz_82  quiz_87  quiz_92  quiz_97

and more .xml

[root@sos quiz_102]# ls -l
total 48
-rw-r--r--. 1 root root   57 May 29 17:50 calendar.xml
-rw-r--r--. 1 root root   61 May 29 17:50 comments.xml
-rw-r--r--. 1 root root  132 May 29 17:50 competencies.xml
-rw-r--r--. 1 root root   67 May 29 17:50 completion.xml
-rw-r--r--. 1 root root  137 May 29 17:50 filters.xml
-rw-r--r--. 1 root root  106 May 29 17:50 grade_history.xml
-rw-r--r--. 1 root root 1305 May 29 17:50 grades.xml
-rw-r--r--. 1 root root  533 May 29 17:50 inforef.xml
-rw-r--r--. 1 root root  760 May 29 17:50 module.xml
*** -rw-r--r--. 1 root root 6789 May 29 17:50 quiz.xml
-rw-r--r--. 1 root root  137 May 29 17:50 roles.xml

If one could determine what certain values should be when one restores to a site, one could 'doctor' the xml's ... repackage the .mbz ... and attempt restore.   *** BETTER do that on a clone of production first!! ***

OR ... option 2 ...

if you have a site backup of when the moodle was 3.5.x, restore that to a localhost instance.   Once that's up and running, access the hidden health tool in admin/tool/health/

Will have listing of problems found and suggestions as sql queries to fix.

Not 100% but might fix your issue enough to make new backups to restore to the 3.7.x.

Think I'd try 'option 2' above before 'mega' effort (which will probably fail whale first time and frustrate one in short order) in the first! smile

'SoS', Ken



Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>