Course Restore fails from Moodle 1.9 to Moodle 2.2.3

Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -
Number of replies: 25

Please help! thanks in advance!

I just totally reinstalled Moodle 2.2.3  this week from scratch and tested importing one of our production courses into it but if fails with the error tmp_backup_directory_not_found.

Background info:

Most important clue that s my setup is the fault is that I tried a restore at demo.moodle.net and it worked there yet when backed up there and imported to my new moodle 2.2.3 it still fails. Am I missing a temp folder I need to create or give access rights to?

I found many possible links but in the interest of brevity I'll list them later if useful.

I have scoured moodle and already tried and failed for

* manual backups of each course

* backup nothing at all, just an empty course fails

*changed language to just EN and theme to standard fails (read error is about language)

My production server specs should not matter at this point because it worked at demo.moodle.net yet failed after backing up from there and restoring in new setup.

But here is is anyway:

Old setup: moodle 1.93 on windows 2003 server with apache 2.2.8 php 5.2.5 mysql 5.051 on a pentium 4 Ha amazing it's serving 1,000 users (100 concurrent)

too many 3rd party plugins and modules to list here - I'm planning on losing those but I need the basics: course names, files, labels, and examview questions are a must.

New server: moodle 2.2.3 windows 2008 enterprise Apache 2.2.22 PHP5.3.2 Mysql 5.5.24 on a Dell PowerEdge r510 (16gb ram & zeon processors)

I'd like to use it in September and have 100 courses to migrate and 30 teachers to re-train.  Any help on this restore issue that you can give would be much appreciated!!!  

Average of ratings: -
In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
There is a lengthy tracker report related to this here: http://tracker.moodle.org/browse/MDL-28514

It would seem that it is mostly a bad error report covering a number of possible problems.

I would also try running with Debugging switched on. You may well see additional warnings or notices that give more information about what's going wrong.
In reply to Howard Miller

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

Thanks for the quick reply Howard.  I had read that link and tried the manual and repository way to restoring without success. If you have any other tips or I'm missing other solutions at that link please let me know. 

 

I'll try turning on debugging  - thanks for reminding me about that.

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Ken Task -
Picture of Particularly helpful Moodlers

First, apologize for the length of this.  Second, maybe by kinda understanding the restore process one might be able to 'get by' ... at least restore a 1.9 course semi-successfully.

During the restore process, a numbered folder is created in moodledata/temp/backup/########## and Moodle uses it to rebuild the course as a version 2.

The following is a few text clips of the process during which there are directories created then removed.  Again, maybe understanding the process will help in creating some of the top level directories used during a restore and one might be able to 'get by' until a true 'fix' is offered.

during restore of a 1.9 course to a 2.x, in the moodledata/temp/ directory there is created an unzip directory.  
Then the uploaded 1.9 course is converted in the backup directory where a folder like:
2faf13c374ebe4de8952827fbaef06ad is created.  It's that folder that is used to 'rebuild' the course as a 2 backup to restore.


Every 2.0s: ls -l backup/2faf13c374ebe4de8952827fbaef06ad                                                      Sun May 20 08:06:26 2012

total 19088
drwxrwxrwx 4 apache apache     4096 May 20 08:01 course_files
drwxrwxrwx 9 apache apache     4096 May 20 08:01 group_files
drwxrwxrwx 4 apache apache     4096 May 20 08:01 moddata
-rw-rw-rw- 1 apache apache 19472811 May 20 08:01 moodle.xml
drwxrwxrwx 2 apache apache     4096 May 20 08:01 site_files
drwxrwxrwx 3 apache apache     4096 May 20 08:01 user_files

Above is what it looks like as a 1.9 course.
After conversion:

Every 2.0s: ls -l backup/2faf13c374ebe4de8952827fbaef06ad                                                      Sun May 20 08:07:22 2012

total 240  
drwxrwxrwx 24 apache apache   4096 May 20 08:06 activities
drwxrwxrwx  2 apache apache   4096 May 20 08:06 course
drwxrwxrwx  7 apache apache   4096 May 20 08:01 files   
-rw-rw-rw-  1 apache apache   8259 May 20 08:06 files.xml
-rw-rw-rw-  1 apache apache   1679 May 20 08:03 gradebook.xml
-rw-rw-rw-  1 apache apache     57 May 20 08:06 groups.xml
-rw-rw-rw-  1 apache apache  24221 May 20 08:06 moodle_backup.xml
-rw-rw-rw-  1 apache apache     83 May 20 08:06 outcomes.xml
-rw-rw-rw-  1 apache apache 109093 May 20 08:02 questions.xml
-rw-rw-rw-  1 apache apache    540 May 20 08:02 roles.xml
-rw-rw-rw-  1 apache apache     79 May 20 08:06 scales.xml
drwxrwxrwx 18 apache apache   4096 May 20 08:02 sections
-rw-rw-rw-  1 apache apache     55 May 20 08:06 users.xml

Course restores, but remaining in the backup directory a file:
-rw-rw-rw- 1 apache apache 65867057 May 20 08:01 3ffcd237806e50e1bf8584eef0a6b35d
It is a zip.

with a corresponding .log file of same date:

[root@moodle backup]# more ce2c6a564254ca3df9f5509539a585dd.log
[Sun 20 May 2012 08:01:59 CDT] [warn] (moodle1) unsupported activity module questionnaire
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/PARTICIPANTS
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/ACTIVITY_MODULES
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/SEARCH_FORUMS
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/ADMIN
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/COURSE_LIST
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/NEWS_ITEMS
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/CALENDAR_UPCOMING
[Sun 20 May 2012 08:02:02 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/RECENT_ACTIVITY
[Sun 20 May 2012 08:06:48 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/MODULES/MOD/QUESTIONNAIRE
[Sun 20 May 2012 08:06:48 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/MODULES/MOD/QUESTIONNAIRE/SURVEY

As you can see from above the 2 to which the 1.9 was restored did NOT have success with a few items.

In investigating the contents of the 3f… file as a zip:

[root@moodle backup]# mkdir test
[root@moodle backup]# mv 3ffcd237806e50e1bf8584eef0a6b35d ./test/test.zip
[root@moodle backup]# ls
ce2c6a564254ca3df9f5509539a585dd.log  test
[root@moodle backup]# cd test
[root@moodle test]# unzip *.zip
Archive:  test.zip
   creating: course_files/
  inflating: course_files/EGGS_rev_2_11.doc  
   creating: course_files/Exam_I/
  inflating: course_files/Exam_I/Computer_Basics_Information.docx  
  inflating: course_files/Exam_I_Review.pdf  
   creating: course_files/Videos/
  inflating: course_files/Videos/SoccerGirlCD.wmv  
  inflating: course_files/Videos/PredatorCD.wmv  
   creating: group_files/
   creating: group_files/2/
   creating: group_files/3/
   creating: group_files/7/
   creating: group_files/1/
   creating: group_files/6/
   creating: group_files/5/
   creating: group_files/4/
   creating: user_files/
   creating: user_files/0/
   creating: user_files/0/969/
   creating: user_files/0/2/
   creating: user_files/0/3/
   creating: user_files/0/215/
   creating: user_files/0/105/
   creating: user_files/0/754/
   creating: user_files/0/188/
   creating: user_files/0/596/
   creating: user_files/0/72/
   creating: user_files/0/190/
   creating: user_files/0/4/
  inflating: user_files/0/4/f1.jpg   
  inflating: user_files/0/4/f2.jpg   
  inflating: moodle.xml              
   creating: moddata/
   creating: moddata/forum/
   creating: moddata/assignment/
   creating: moddata/assignment/2/
   creating: moddata/assignment/2/72/
   creating: site_files/

The course files above do end up in legacy.

and the 3ffcd237806e50e1bf8584eef0a6b35d is NOT removed from the directory … just yet - that is done via cron job when it's moved to trash_dir and then eventually eradicated at some point in time in the future (4 days?).

What directories are needed?

in moodledata/temp/ a 'backup' directory with permissions set to allow apache user/group to create not only folders but files ... as well as remove them.  There should also be a zip and unzip directory at that level.

Since I used URL downloader as the repo to acquire the 1.9 backup, a 'download' folder.

In the moodledata/temp/backup folder, see if there is a 'hashed' file name ... something like:

3ffcd237806e50e1bf8584eef0a6b35d

and a .log file by hash name that's larger than 0 bytes (0 byte sized .log files indicates successful restores).  Something like:

ce2c6a564254ca3df9f5509539a585dd.log

One cannot create manually those hashed named directories for files.

Think the log file will help in cleaning up the 1.9 course to be backed up in 1.9 and restored.  OR in preparing the 2 with missing mods/blocks, etc. compat with version 2.  Hopefully, those addon mods/blocks etc. will be included in the next attempt at restoring.

And a question ... in apache error log files are there errors that have the word 'unlink' in them?  Have seen reports that Windows servers not appropriately configured might not be able to remove temporary files/folders created during the restore process (permissions or a php bug if I re-call correctly).

'spirit of sharing',  Ken

In reply to Ken Task

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

Hi Ken and Howard,

ok, first, before I made any change, I'm noting that now I can't even get the 'choose a file' button to work - I no longer see any of my repositories.  I had enabled google and dropbox which were working fine but now are not visible.  So I restarted the whole computer and tried again.  I also turned those repositories off and then back on again in administration.  Anway, I get the error below

2nd I turned on developer error reporting so I see everything. I also tried to give apache rights to my c:/moodle folder but I'm not sure if I did it the right way.

In c:/moodle  folder properties/permissions I gave administrator full read/write and ownership and pushed it down to all child objects.  (php, apache, and mysql folders are installed there as well as moodle)

next in services.msc for apache/properties/logon as I chose administrator with that password.  I restarted that service and checked task manager that it is indeed running under administrator which it is. 

So, any ideas now about my error below AND now why I've lost repository access??? it was not due to these changes because I've set it back and forth with no joy.  Thanks in advance - James

 

[Exception... "An invalid or illegal string was specified"  code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"  location: "http://localhost/moodle/theme/yui_combo.php?3.4.1/build/oop/oop.js&3.4.1/build/event-custom-base/event-custom-base.js&3.4.1/build/dom-core/dom-core.js&3.4.1/build/dom-base/dom-base.js&3.4.1/build/selector-native/selector-native.js&3.4.1/build/selector/selector.js&3.4.1/build/node-core/node-core.js&3.4.1/build/node-base/node-base.js&3.4.1/build/event-base/event-base.js&3.4.1/build/event-delegate/event-delegate.js&3.4.1/build/node-event-delegate/node-event-delegate.js&3.4.1/build/pluginhost-base/pluginhost-base.js&3.4.1/build/pluginhost-config/pluginhost-config.js&3.4.1/build/node-pluginhost/node-pluginhost.js&3.4.1/build/dom-style/dom-style.js&3.4.1/build/dom-screen/dom-screen.js&3.4.1/build/node-screen/node-screen.js&3.4.1/build/node-style/node-style.js&3.4.1/build/event-custom-complex/event-custom-complex.js&3.4.1/build/intl/intl.js Line: 4228"]

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You turned on 'XML Strict Headers' I bet?? wink
In reply to Howard Miller

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

 Howard, you are a genius!  I would have never realized I accidentally checked that one off - I make notes of all changes I make and I only listed the two above. I must have inadvertently clicked it too.

 

Cool, all repositories are back so now I can find my errors: here's what I get restoring a moodle 2 (from demo moodle online) to my moodle 2.2.3 below:

error/tmp_backup_directory_not_found

More information about this error

Stack trace:
  • line 146 of \backup\util\helper\convert_helper.class.php: convert_helper_exception thrown
  • line 242 of \backup\util\helper\backup_general_helper.class.php: call to convert_helper::detect_moodle2_format()
  • line 188 of \backup\util\ui\restore_ui_stage.class.php: call to backup_general_helper::detect_backup_format()
  • line 67 of \backup\restore.php: call to restore_ui_stage_confirm->display()

What do all these calls to "convert_helper' mean?  any clue what's not working now?

Thanks again, James

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Once again, this just seems to confirm MDL-28514. I know this doesn't help you much but you might be as well to Vote/Watch/"Me Too" that bug report. I'm not sure there's much else to be done unless you want to roll your sleeves up and do some heavy code debugging.
In reply to Howard Miller

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

I voted and am watching it!  I thought that was resolved by manual downloads but for me not even that is working.  I would love to dig into the code if it was vba but I don't know php much at all.  I would love to follow a discussion on how to change the code though - how could I get involved - where in the code is it failing exactly.

If demo.moodle.net works fine, then maybe I should install that version - is it 2.3? I could install that instead it's so close to production.  I waited to update our moodle until now because I had read that they solved the whole restore process from 1.9.  For whom did they solve it and which version? There must be a workaround somehow or else I'm training all my staff to totally re-create their courses before september!

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

alternatively, what workarounds do I have to put all courses in? 

If not I may have to train my teachers to  copy and paste every single label into the new moodle2 and then help them individually with uploading examview questions (which I hope is supported in 2.2.3) 

What about the workaround to paste the folder from one server into the moodle data folder of my new Moodle?  it seems like they differ now - I used to be be able to find the courses by number and manually paste in big files so I would not have to upload them but now I dont' see course folders with numbers like moodle 1.9 had.

Thanks

Jamie

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Rosario Carcò -

I thought Restore of 1.9 Backup-Zip-Files would be only possible starting with 2.3 and until then the workaraound would be:

http://moodle.org/mod/forum/discuss.php?d=192355#p837576

Rosario

In reply to Rosario Carcò

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jon Fila -

I think that's only true if you want to include user data. Otherwise 1.9 backups have restored since 2.1.

In reply to Jon Fila

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

I'd be happy to just have the course with no users but at the moment I can't even get a new empty course to restore from 1.9 nor even one from the demo site demo.moodle.net.  So I'm thinking something is wrong with the way I installed it.  Any ideas. Am I giving permission right to apache to the folder? do I need to un comment out an extention?  Something has to work.

In reply to Rosario Carcò

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

What location would I copy the backup files?  I no longer see where courses reside to restore it.  However, if it fails to restore from a working demo.moodle.net then I'm doubtful placing it in a new location and restoring from 1.93 will work.  Even if I update my server to 1.9 I'm not sure how that will make a differnce if again my 2.? from demo.moodle.net does not work to restore either.  I welcome any workaround besides re-tying all 100 courses.

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by John Feagans -

Hi Jamie, The procedure I use is:

1. create a folder in Moodledata called "repository"

2. enable the file system plugin under repositories

3. create a folder in repositories like "backup" give a name to create a new repository through the plugin

4. FTP the 1.9x backups to the  folder

5. restore under the main menu and select the backup from the repository.

Hope this helps.

In reply to John Feagans

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Rosario Carcò -

Thanks, good to know. In Moodle 1.9 I created simply a course BACKUP&RESTORE. Then put all of your backup-zip-files into its moodleData/courseID/backupdata directory to avoid them being included in the courses' backup again. And restore at your will from there.

Rosario

In reply to Rosario Carcò

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Ken Task -
Picture of Particularly helpful Moodlers

As long as we're sharing 'preferences' ... have used the following:

* create a web accessible directory outside of moodle/moodledata.  Example: m19xfers

* copied via whatever means available: ftp, scp, etc. the Moodle 1.9 backups there.  Could also set backups for all courses to be saved there in 1.9 or in 2.x automated backups.  Since Moodle does provide options in creating backups, might be best NOT to include user information.

* .htacess protect the directory (m19xfers)

* Enable URL repo and use it to restore LARGE 1.9 courses that otherwise might be blocked when uploading (php restrictions).

'spirit of sharing', Ken

In reply to Rosario Carcò

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

HI Rosario - I'm not sure what you mean here - are you meaning to avoid the automated backup?  I am only doing it manually.  The courseID part is what I'm used to in 1.9. For example, I see moodle/course/view.php?d=4 so in moodle 1.9 I would navigate to the course with number 4 and could find backups and other files. I don't see a course 4 in there as I think it's encripoted now more.

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Rosario Carcò -

NO, if you put your backup-zip-files anywhere in yourMoodleData/4/ directory then everything gets included in your backup even doing it manually. To avoid this I figured out the trick to put files I do not want to include in any backup, directly into the yourMoodleData/4/backupdata directory.

Rosario

Average of ratings: Useful (1)
In reply to John Feagans

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

Thanks John  - Just to be clear I can use the repository to get to dropbox so I think the issue is with the size & contents of the file not access.

However, I would like the server file method to work because the upload fails when it' stoo big and I worry that dropbox may be changing it somehow.  

So, to try 'server files' method I added a folder called repository under Moodledata as suggested but it does not show.  Server files only shows system/front page. I see under system my course categories and courses yet I can't find them in explorer by searching anymore like I used to.  i found some cryptic names but I'm not sure which is which here 

moodle2/apache/moodledata/filedir/9a   How can I find the right folder to paste the backup to in explorer?  putting backups in repository or moodle data does not show up anywhere like I can see them from dropbox.

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Ken Task -
Picture of Particularly helpful Moodlers

There is a 'warning.txt' file in filedir.  To save you time, it says:

"This directory contains the content of uploaded files and is controlled by Moodle code. Do not manually move, change or rename any of the files and subdirectories here."

That also includes adding any files.  Those additions won't show in the file chooser anyway as there are no records in the mdl_files table to tell Moodle of their existance and location.

Any folder manually created in the 'repository' directory must:

1. have permissions set so apache user/group can see/read/write

2. be linked in the course as a repository to use for the course (at course level 'add a repo instance').

Have found that using the Moodle 2 repositories for restoring 1.9.x courses adds to the 'complexity' of things in that the mdl_files table grows rather large AND if one does not use a 1.9.x backup to restore a course and then remove the 1.9.x backup, it will stay until the cron jobs move un-used files (actually now records in the DB) to another status, then eventually to the trash_dir and thus (finally) removed from the database.

That's why eventually restorted to a web accessible directory containing the 1.9.x backups OUTSIDE of Moodle completely.  That structure also lends itself well to using URL repo to restore (thus, also, getting by the  lower php max_size_upload limitations set for site).

'spirit of sharing', Ken

In reply to John Feagans

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by al tobing -

Hi, thank you for this info smile Save me a lot of time uploading files to moodle.

Average of ratings: Useful (1)
In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Ken Task -
Picture of Particularly helpful Moodlers

Sounds like you need another set of eyes ... so here's an offer.

Assume your 1.9.3 is still up and running, go to a course and make a *NO USER* backup of  the course.  When prompted for the filename of the backup include -NU- in the filename so as not to get confused later.

Then, go to: http://moodle.tcea.org/sandbox2/ (yes, that's a real server [2.2.3] - for 'tinkering' purposes) and acquire an account.  Let me know you've done so via IM in Moodle.org.  I'll create a hidden category for you and set you up with a level of access where you can restore the backup.

Let me know if there are any 3rd party mods/blocks used in that course ... by that I mean mods/blocks that are NOT core to Moodle.  Also send me a screen shot of what that course looks like on your functioning server.

It might fail on that server also, but at least I'll be able to see/view the actual 1.9 backup from which you are trying to restore.

'spirit of sharing', Ken

In reply to Ken Task

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

update

Thanks to Ken I got to try it at his course.

BTW, yesterday I got a blank course 3KB to load and restore by importing to our server but anyting larger fails.

Today on Ken's Moodle I tried a larger 108 file imported but got this error  I tried one that was 108kb and it failed with this error

error/unsupported_subplugin  On my moodle 2.2.3 I also got a 108kb one to load with this error

error/unsupported_subplugin

More information about this error

Stack trace:
  • line 197 of \mod\assignment\backup\moodle1\lib.php: moodle1_convert_exception thrown
  • line 132 of \mod\assignment\backup\moodle1\lib.php: call to moodle1_mod_assignment_handler->get_subplugin_handler()
  • line 111 of \mod\assignment\backup\moodle1\lib.php: call to moodle1_mod_assignment_handler->handle_assignment_subplugin()
  • line 299 of \backup\converter\moodle1\lib.php: call to moodle1_mod_assignment_handler->process_assignment()
  • line 737 of \backup\converter\moodle1\lib.php: call to moodle1_converter->process_chunk()
  • line 125 of \backup\util\xml\parser\processors\grouped_parser_processor.class.php: call to moodle1_parser_processor->dispatch_chunk()
  • line 148 of \backup\util\xml\parser\processors\simplified_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
  • line 92 of \backup\util\xml\parser\processors\progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
  • line 169 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of \backup\util\xml\parser\progressive_parser.class.php: call to xml_parse()
  • line 137 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->parse()
  • line 150 of \backup\converter\moodle1\lib.php: call to progressive_parser->process()
  • line 128 of \backup\converter\convertlib.php: call to moodle1_converter->execute()
  • line 215 of \backup\util\helper\convert_helper.class.php: call to base_converter->convert()
  • line 421 of \backup\controller\restore_controller.class.php: call to convert_helper::to_moodle2_format()
  • line 35 of \backup\restore.php: call to restore_controller->convert()
Output buffer: (moodle1) question type converter not found imagetarget<br/> (moodle1) question type converter not found imagetarget<br/> (moodle1) question type converter not found imagetarget<br/> Warning: unlink(C:\Moodle2\Apache\moodledata/temp/backup/cbf5c9846d4fbf15a4a91170e80d8337_moodle1_d4740552b911684d9796eb4edd14fc38/activities/assignment_4997/assignment.xml): Permission denied in C:\Moodle2\Apache\htdocs\moodle\lib\filelib.php on line 2262
 
At which point it fails to load anything into the course.
Next trial is trying to load a 320,000kb file no names no grades but lots of questions from a production course and it fails to import into my moodle  and fails to load even in dropbox.
I'm trying to import it into Kens now with result . .  . . it's going nowhere. too bigwith error 'The uploaded file may exceed max_post_size directive in php.ini'
Maybe I could change that in my moodle and try again.
 
so How am I going to get these kinds in.  Not sure why my original error is not showing but I have new errors!  Anyone know the file limitation for importing, dropbox, and a way around to put it directly in my restore/moodledata location?
Thanks everyone and especially you Ken!
 
Note in ALL backups I do them manually, never put grade history, userdata, users, nor even roles.  In the 320,000kb one I did put course files so I will try it again without any files.  I'm just trying to get the basics here for my teachers.
 
In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Ken Task -
Picture of Particularly helpful Moodlers

Warning: unlink(C:\Moodle2\Apache\moodledata/temp/backup/cbf5c9846d4fbf15a4a91170e80d8337_moodle1_d4740552b911684d9796eb4edd14fc38/activities/assignment_4997/assignment.xml): Permission denied in C:\Moodle2\Apache\htdocs\moodle\lib\filelib.php on line 2262

Seem to re-call seeing/reading about Windows servers using certain versions of PHP having issues with creating temp files and then removing them.  The restore of a 1.9 course has to be converted to a 2 version first using a routine that creates temporary files.  Those temporary files MUST eventually be removed.  That's the 'unlink' error you see above.  Doesn't happen on Linux flavored boxen.

In this case it was an assignment.

320,000kb ... is that really a 320 KB file or a 320 Meg file?

I think also we still have a little mis-understanding about Moodle 2 but gaining! ;)  Moodle 2 no longer uses course ID folders in the data directory.  If you migrated a 1.9 site to a 2 then I've noticed the course ID folders might be in the data directory for 2, but they contain nothing ... and actually DO nothing.  In version 2, the 'file system' has moved to the database ... in particular, mdl_files table.  What one sees as links to files are really links to records in the DB ... they just appear to be files.

In looking at logs on the TCEA server I see that an attempt was made importing.  There is a course there now which describes the restore of 1.9 courses via URL downloader.

Since another set of eyes can now see something ...

During the restore process, Moodle uses the datadirectory/temp/backup as it's work space.  Successful restores/backups leave a 0 byte .log file.  Un-successful restores leave a log file with references.  Here's the one left for the attempt to restore on the sandbox2:

[root@moodle backup]# more e6c6966efd98195d8451d24f29fa4dc0.log
[Wed 23 May 2012 18:28:54 CDT] [warn] (moodle1) unsupported activity module flv
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/PARTICIPANTS
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/ACTIVITY_MODULES
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/SEARCH_FORUMS
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/ADMIN
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/COURSE_LIST
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/NEWS_ITEMS
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/CALENDAR_UPCOMING
[Wed 23 May 2012 18:28:55 CDT] [warn] (moodle1) no handler attached /MOODLE_BACKUP/COURSE/BLOCKS/BLOCK/RECENT_ACTIVITY
[Wed 23 May 2012 18:29:01 CDT] [error] (moodle1) question type converter not found imagetarget
[Wed 23 May 2012 18:29:01 CDT] [error] (moodle1) question type converter not found imagetarget
[Wed 23 May 2012 18:29:01 CDT] [warn] (moodle1) question file not found 18685, /USA_map.png
[Wed 23 May 2012 18:29:01 CDT] [error] (moodle1) question type converter not found imagetarget

Matter of fact, a directory containing the failed 1.9 conversion now exist:

[root@moodle b31ac957d4c779c91bfb2085c562742f]# pwd
/var/www/sandbox2data/temp/backup/b31ac957d4c779c91bfb2085c562742f
[root@moodle b31ac957d4c779c91bfb2085c562742f]# ls -l
total 2008
drwxrwxrwx 2 apache apache    4096 May 23 18:28 course_files
drwxrwxrwx 3 apache apache    4096 May 23 18:28 moddata
-rw-rw-rw- 1 apache apache 2028945 May 23 18:28 moodle.xml

Bet if you look in your 2 data directory/temp/backup you will see some folders with long names (like the b31... above) and contained there in other files folders like:

[root@moodle b31ac957d4c779c91bfb2085c562742f]# ls -l
total 2008
drwxrwxrwx 2 apache apache    4096 May 23 18:28 course_files
drwxrwxrwx 3 apache apache    4096 May 23 18:28 moddata
-rw-rw-rw- 1 apache apache 2028945 May 23 18:28 moodle.xml

At the head of the moodle.xml file:

    <NAME>backupExHQT.zip</NAME>
    <MOODLE_VERSION>2007101509</MOODLE_VERSION>
    <MOODLE_RELEASE>1.9 + (Build: 20080416)</MOODLE_RELEASE>
    <BACKUP_VERSION>2008030300</BACKUP_VERSION>

See the backupExHQT.zip file name?  If some human didn't name the backup as such, that's the temp name.  And, from the version numbers I see, quite OLD.

IT is SAFE to remove/erase any failed attempt folders/files.

Now a question ... in the 1.9 course backup, do you have an addon for 'flv'?  Create a backup of that course and restore a *copy* to your 1.9  Moodle.  In the copy of the course, remove that resource.  Remove the calendar, news items forum, etc.  Then make another backup and use that in an attempt to restore to a 2.  Also, export the quiz.  Please use the sandbox2 so I can inspect.

Have sent EMail directly to you - off list - we can come back to this forum discussion once we've worked out issues.

'spirit of sharing', Ken

In reply to Jamie Tinley

Re: Course Restore fails from Moodle 1.9 to Moodle 2.2.3

by Jamie Tinley -

Progress smile

Ok, First using Ken's course and being successful and then on mine, I split the file up (which of course someone said and I read long ago but resisted).  I had to split it down to Just the resources 9kb and that worked on both moodles.  Next I did Quizzes (101kb) and that worked too - thankfully with most questions intact with images from examview!!!

(you can check a few that failed Ken, no idea why like 'Identify California' on the sample quiz bank of 52 questions. Oh, I see on mine this is an image target question.  I don't know if that plugin is available yet for moodle 2. ok. 

Thanks for everyone's help.  I don't care about student names and data.  The only loss is assignments seems to fail. Oh I see again - I added pdf modules to my original site so that's why there.  ok, I think I am good to go. It sounds like even if I got my file limitation size larger or got the moodledata/repository to work it would not matter because it won't parse my files even with questions and resources together. good FYI for anyone else experiencing this trouble.

Thanks again!