Moodle returns a 'Can not read file' error when I try to back up.

Moodle returns a 'Can not read file' error when I try to back up.

by Joe Cape -
Number of replies: 2
Picture of Plugin developers

Hi,

Previously I could not back up my course because permissions were not set to allow for creation of a temporary table (http://moodle.org/mod/forum/discuss.php?d=169381). This problem was resolved, and I was able to backup the site. However, recently I have came across a different problem that stops the site from backing up.

Here is the message that I am shown:

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

More information about this error

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()
Average of ratings: -
In reply to Joe Cape

Re: Moodle returns a 'Can not read file' error when I try to back up.

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Oh my... um... um... Go into the course proper and look at it. Is it all looking as it should? Has something changed? I cannot recall seeing a denial of backup capability for anyone or for a course so it is safe to assume that there is something in the environment that is causing the issue. If permissions have been set then consider your circumstances. Are you on a shared host or a dedicated server? If you are using a shared host then I would suggest you check both your space allocations and as the backup process can be a little memory intense, is there sufficient allocation to do a complete backup? If a dedciated server, then you need to look a little further...

In reply to Colin Fraser

Re: Moodle returns a 'Can not read file' error when I try to back up.

by Joe Cape -
Picture of Plugin developers

It does indeed seem to be something in the environment - something within the course - because I am able to back up the  first 'topic' - which is the one that sits at the top for every 'single topic' view. If I try to back up any more than just that topic then the error I posted above is returned.

I don't know what I have in my course which stops the backup process from being completed - it is all fairly standard. Activities and resources that are provided with Moodle 2.0.1 - the only non-standard Moodle add-ons I use in the course are:

* The user contact block and

* Hot Pots activities.

But I had previously been backing up without any problems while using both of these.