Can not read file Backup problem

Can not read file Backup problem

by Rustam Gasanov -
Number of replies: 12

Hello, ive got 2.0.2+ moodle version running. Some courses backup fails, and i dont know what to do. i found that new folder in that case in "moodle-data" is not even created. error message:

Can not read file, either file does not exist or there are permission problems

Stack trace:
  • line 174 of /lib/filestorage/stored_file.php: file_exception thrown
  • line 90 of /backup/util/helper/backup_file_manager.class.php: call to stored_file->copy_content_to()
  • line 101 of /backup/moodle2/backup_custom_fields.php: call to backup_file_manager::copy_file_moodle2backup()
  • line 70 of /backup/util/structure/backup_nested_element.class.php: call to file_nested_element->fill_values()
  • line 94 of /backup/moodle2/backup_custom_fields.php: call to backup_nested_element->process()
  • line 95 of /backup/util/structure/backup_nested_element.class.php: call to file_nested_element->process()
  • line 95 of /backup/util/plan/backup_structure_step.class.php: call to backup_nested_element->process()
  • line 153 of /backup/util/plan/base_task.class.php: call to backup_structure_step->execute()
  • line 148 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 105 of /backup/util/plan/backup_plan.class.php: call to base_plan->execute()
  • line 293 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
  • line 111 of /backup/util/ui/backup_ui.class.php: call to backup_controller->execute_plan()
  • line 87 of /backup/backup.php: call to backup_ui->execute()

Moreover i found this message in backup folder error log:

Potential coding error - existing temptables found when disposing database. Must be dropped!

Can anybody help?

Average of ratings: -
In reply to Rustam Gasanov

Moodle 2.02 doesn't perform backup

by Deleted user -

I'm having a similar problem.  I upgraded to Moodle 2.02.  Started a backup of the only course as Admin.  Everything works fine until Step 4. Perform backup and then I get a blank screen on the browser when it attempts http://domain-name/backup/backup.php.  The moodledata/temp/backup folder has two zero byte files with a garbled filename.

In reply to Deleted user

Re: Moodle 2.02 doesn't perform backup

by Jane Erlandson -

I had the same thing happen ... but when I went back to the backup page, which I only knew to get to by clicking Restore, I saw the backup completed.

In reply to Jane Erlandson

Re: Moodle 2.02 doesn't perform backup

by Simon Brock -

we are having a similar problem, when we run the cron script it backs up several courses then fails

Can not read file, either file does not exist or there are permission problems !!!

this then causes the backup_auto_running to keep value 1, so the backups
apprear to be running the next time cron runs
In reply to Deleted user

Re: Moodle 2.02 doesn't perform backup

by Deleted user -

Same issue, but turned on debugging:  backup.php hangs and throws this error:

Fatal error: Out of memory (allocated 64225280) (tried to allocate 6636723 bytes) in /home/teachme8/public_html/lib/navigationlib.php on line 3880

In reply to Deleted user

Re: Moodle 2.02 doesn't perform backup

by Deleted user -

Follow-up:  Hostgator hosting service says this:

That error indicates the script is hitting its 64 MB memory limit, which is the maximum allowed on shared servers. If it's attempting to backup the entire public_html directory installation (which is 800 MB), it would be using a large amount of PHP memory to accomplish this and would thus fail. However, if you can provide the username and password to the Moodle installation so we can attempt a backup ourselves we can see whether some sort of plugin or setting is causing the process to use a large amount of memory.

In reply to Deleted user

Re: Moodle 2.02 doesn't perform backup

by Deleted user -

Response from Hostgator tech support is that they were able to do two backups with students.  I discovered that Firefox 4 and 3.6.1 will definitely hang when running the backup.php script.  IE 8 did create a no student backup the first time, but then hung on the second attempt.

I'm not clear if this is a browser issue, but I will keep experimenting.

jc

In reply to Rustam Gasanov

Re: Can not read file Backup problem

by Henry Foster -

We're having a similar problem. We're using Moodle 2.0.2+ (Build: 20110309). Some courses back up just fine, but there is at least one that returns the error "Can not read file, either file does not exist or there are permission problems" when backing up without user data. When I tried backing up with user data, I got nothing but a blank screen. Either way, no file was produced in the backup files area.

In reply to Henry Foster

Re: Can not read file Backup problem

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Without being too sure of anything said above, I have no backup issues with 2.0.x as my PHP.ini file is set to the max of 128MB - but I am not on a shared server. Perhaps you may want to discuss with your host a possibility of moving to a dedicated server, or perhaps discussing a private server. I imagine there could be a substantial cost hit in most circumstances, but it may be necessary.

The alternative is to make sure that your courses remain below a particular size. For me, 800MB for a set of courses on a shared server is not large, 800Gb would be outrageous, so it should be backing up. However, a multimedia course full of large videos, or courses that have really grown organically and are now candidates for redesign may imbalance a backup, causing issues. I have often suspected the composition of the backup is important, but do not know enough about it to be sure. While these are other issues, they may impact on the success of a backup operation and may need to be considered.

Personally, I encourage people to keep their courses as small and as tight as they can by emphasising that resources can be found anyhere, it is the activities that are really important. For most courses, 50MB is usually a good limit, but for other courses, this is just not enough, so good design is critical.

In reply to Colin Fraser

Re: Can not read file Backup problem

by Deleted user -

64 MB is the max allowed by Hostgator on a shared server.  My course with all student data is 48.5 MB.

In reply to Deleted user

Re: Can not read file Backup problem [V2.2.2]

by Kyle Egan -

Hi I have my Max_memory set to 1024 and I am getting the same issue:

Can not read file, either file does not exist or there are permission problems More information about this error

Debug info: C:\moodledata/filedir/d1/9b/d19b51212c1aec8dc63b95f9e56261714ad5d804

Stack trace: line 174 of \lib\filestorage\stored_file.php: file_exception thrown line 90 of \backup\util\helper\backup_file_manager.class.php: call to stored_file->copy_content_to() line 101 of \backup\moodle2\backup_custom_fields.php: call to backup_file_manager::copy_file_moodle2backup() line 70 of \backup\util\structure\backup_nested_element.class.php: call to file_nested_element->fill_values() line 94 of \backup\moodle2\backup_custom_fields.php: call to backup_nested_element->process() line 95 of \backup\util\structure\backup_nested_element.class.php: call to file_nested_element->process() line 95 of \backup\util\plan\backup_structure_step.class.php: call to backup_nested_element->process() line 153 of \backup\util\plan\base_task.class.php: call to backup_structure_step->execute() line 148 of \backup\util\plan\base_plan.class.php: call to base_task->execute() line 106 of \backup\util\plan\backup_plan.class.php: call to base_plan->execute() line 309 of \backup\controller\backup_controller.class.php: call to backup_plan->execute() line 111 of \backup\util\ui\backup_ui.class.php: call to backup_controller->execute_plan() line 89 of \backup\backup.php: call to backup_ui->execute()