Backup stopped working after PHP upgrade

Backup stopped working after PHP upgrade

by Victor Balakine -
Number of replies: 0

This is the error I get trying to backup a course manually:

Can not read file, either file does not exist or there are permission problems
Debug info: /var/www/vhosts/moodle/moodle_data/temp/backup/cadc27642ecdf63bea47a66275827b88/backup.mbz
Stack trace:
    line 1098 of /lib/filestorage/file_storage.php: file_exception thrown
    line 839 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
    line 278 of /backup/util/helper/backup_helper.class.php: call to file_storage->create_file_from_pathname()
    line 1542 of /backup/moodle2/backup_stepslib.php: call to backup_helper::store_backup_file()
    line 34 of /backup/util/plan/backup_execution_step.class.php: call to backup_store_backup_file->define_execution()
    line 153 of /backup/util/plan/base_task.class.php: call to backup_execution_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 296 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()

Cron backup gives a very similar error message:

instantiating backup controller 1ec1d9b28b131b2f96c240a016854a4b
setting controller status to 100
loading controller plan
setting controller status to 300
applying plan defaults
setting controller status to 400
checking plan security
setting controller status to 700
saving controller to db
calculating controller checksum 0f7ad0ab5483d6d310db9dd96e74c924
loading controller from db
setting controller status to 700
saving controller to db
calculating controller checksum e548429d146a93b2c0bcf45a5f9103a8
loading controller from db
setting controller status to 800
Default exception handler: Can not read file, either file does not exist or there are permission problems
Debug: /var/www/vhosts/moodle/moodle_data/temp/backup/1ec1d9b28b131b2f96c240a016854a4b/backup.mbz

* line 1098 of /lib/filestorage/file_storage.php: file_exception thrown
* line 839 of /lib/filestorage/file_storage.php: call to file_storage->add_file_to_pool()
* line 278 of /backup/util/helper/backup_helper.class.php: call to file_storage->create_file_from_pathname()
* line 1542 of /backup/moodle2/backup_stepslib.php: call to backup_helper::store_backup_file()
* line 34 of /backup/util/plan/backup_execution_step.class.php: call to backup_store_backup_file->define_execution()
* line 153 of /backup/util/plan/base_task.class.php: call to backup_execution_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 296 of /backup/controller/backup_controller.class.php: call to backup_plan->execute()
* line 351 of /backup/util/helper/backup_cron_helper.class.php: call to backup_controller->execute_plan()
* line 158 of /backup/util/helper/backup_cron_helper.class.php: call to backup_cron_automated_helper::launch_automated_backup()
* line 338 of /lib/cronlib.php: call to backup_cron_automated_helper::run_automated_backup()
* line 61 of /admin/cli/cron.php: call to cron_run()
Potential coding error - existing temptables found when disposing database. Must be dropped!

RHEL 5.9, MySQL 5.0.95, PHP 5.5.0, Apache 2.2.3, Moodle 2.1.3+ (Build: 20111209)

I have several sites on this server and the problem affects all of them. The backup.mbz file doesn't exist, but there are other files in /temp/backup/1ec1d9b28b131b2f96c240a016854a4b/, so I am guessing there is a problem with creating that particular file, and it's not permissions. My debug messages level is already at DEVELOPER, but I have a feeling that I am missing some PHP error messages here. Any suggestions?

Average of ratings: -