Backup and restore

 
 
Picture of Robs Disbury
Error Restoring Moodle 1.9 backup to Moodle 2.4
 

Hi,

 

we are trying to restore courses from 1.9 to our new 2.4.  this is the error we get:

 

Debug info:
Error code: file_invalid_path
$a contents: E:\moodleData/temp/backup/5ac37d9feff328ecba048752c582b5e7/course_files\Elective_studies.ppt
Stack trace:
  • line 1216 of \backup\converter\moodle1\lib.php: moodle1_convert_exception thrown
  • line 1303 of \backup\converter\moodle1\lib.php: call to moodle1_file_manager->migrate_file()
  • line 578 of \backup\converter\moodle1\handlerlib.php: call to moodle1_file_manager->migrate_directory()
  • line 566 of \backup\converter\moodle1\handlerlib.php: call to moodle1_files_handler->migrate_course_files()
  • line 312 of \backup\converter\moodle1\handlerlib.php: call to moodle1_files_handler->process()
  • line 371 of \backup\converter\moodle1\lib.php: call to moodle1_root_handler->on_root_element_start()
  • line 757 of \backup\converter\moodle1\lib.php: call to moodle1_converter->path_start_reached()
  • line 228 of \backup\util\xml\parser\processors\simplified_parser_processor.class.php: call to moodle1_parser_processor->notify_path_start()
  • line 102 of \backup\util\xml\parser\processors\simplified_parser_processor.class.php: call to simplified_parser_processor->process_pending_startend_notifications()
  • 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 212 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->start_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 129 of \backup\converter\convertlib.php: call to moodle1_converter->execute()
  • line 209 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()

i have checked the server and the folders and files do exist there.

thanks

robs

 
Average of ratings: -
Picture of Kevin Wiliarty
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
Group DevelopersGroup Testers

We had a similar -- not identical -- problem yesterday. Our sysadmin found this PHP bug report:

https://bugs.php.net/bug.php?id=48547

It seems to fit what you are experiencing.

 
Average of ratings: -
Picture of Jayne Bachelor
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

Hi we had the exact problem today.  To overcome the issue our server admin created a copy of 2.3.1.  This did create an additonal step of restoring 1.9 courses into the test moodle first however we were then able to restore from 2.3.1 to 2.4.

Not an ideal workaround but we have teachers commencing classes in a week and these course must be moved.

Hope this works for you.

 
Average of ratings: -
Picture of Robs Disbury
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

hi,

many thanks for the reply. with the 2.3 are you using a windows server?

thanks

robs

 
Average of ratings: -
Picture of Jayne Bachelor
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

Hi Robs

yes we are using Windows server and

FREETDS driver not the new MS-SQL driver for PHP.

 
Average of ratings: -
Picture of C K
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

Hello - We're having the same problem - getting a:

error/file_invalid_path

More information about this error

With, of course, no information about this error available. We recovered about 20 1.9 courses to 2.4 without any issues, but this one is being stubborn. Any ideas on where to look for a fix? I'm not running on a Windows server.

Thanks!

 
Average of ratings: -
Picture of Jayne Bachelor
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

Hello Charlie

We did have that problem but changed the PHP driver to FREETDS  not the new MS-SQL driver for PHP and this helped with that error.

 

 
Average of ratings: -
Picture of Ken Task
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
Group Particularly helpful Moodlers

Turn on debugging then copy/paste the results back here (as original poster did).  Need to see where/what is failing.

What follows may/may not be the solution:

Unzip the backup in a test folder.  Open the moodle.xml file in a text editor and find the 'matching' referred to file/element that may have been reported in debug.

It is possible to edit the moodle.xml file and remove elements.  Re-zip the items that were extracted from the original zip into a zip that will extract as it did before .. moodle.xml file at the 'root' of the extracted contents.  Then attempt restoring again.  It's not pretty and does require some effort, but it could be done.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Benjamin St.Germain
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

We are seeing the exact same issue with importing classes from 1.9 to 2.3.4 on Windows servers, and did not have this issue on 2.3.3 as I imported a number of classes without this error.  In my testing it appears to be an issue in the import during the conversion process after the "Destination" step with all files in the "course_files" directory of the backup .zip file.  The import fails on each file in that directory, and as I remove each one that causes the error from the .zip and try again, the next file in line then causes the same error. 

Once I remove all files form course_files in the export .zip, the import process completes with no errors.  So this is an ok work around for classes with few course_files, but most of ours have a number of files and this will break all links to them in the course, and we have upload the removed files and fix all of the links after the fact.

Here is an example of our error message and stack trace:

Debug info:
Error code: file_invalid_path
$a contents: \\SERVERNAME.DOMAIN\MOODLEDATA$/temp/backup/d059109be15b84a9650fc97a9e6c4e4b/course_files\2013-ESL_016-What_did_you_do_last_weekend-Jan._14_2013.docx
Stack trace:
  • line 1215 of \backup\converter\moodle1\lib.php: moodle1_convert_exception thrown
  • line 1302 of \backup\converter\moodle1\lib.php: call to moodle1_file_manager->migrate_file()
  • line 578 of \backup\converter\moodle1\handlerlib.php: call to moodle1_file_manager->migrate_directory()
  • line 566 of \backup\converter\moodle1\handlerlib.php: call to moodle1_files_handler->migrate_course_files()
  • line 312 of \backup\converter\moodle1\handlerlib.php: call to moodle1_files_handler->process()
  • line 371 of \backup\converter\moodle1\lib.php: call to moodle1_root_handler->on_root_element_start()
  • line 756 of \backup\converter\moodle1\lib.php: call to moodle1_converter->path_start_reached()
  • line 228 of \backup\util\xml\parser\processors\simplified_parser_processor.class.php: call to moodle1_parser_processor->notify_path_start()
  • line 102 of \backup\util\xml\parser\processors\simplified_parser_processor.class.php: call to simplified_parser_processor->process_pending_startend_notifications()
  • 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 212 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->start_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 129 of \backup\converter\convertlib.php: call to moodle1_converter->execute()
  • line 209 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()
 
Average of ratings: -
Picture of Benjamin St.Germain
Re: Error Restoring Moodle 1.9 backup to Moodle 2.4
 

There is an open bug tracker for this now:

https://tracker.moodle.org/browse/MDL-37879

 
Average of ratings:Useful (2)