Backup of Courses

Backup of Courses

by Sharon McMenemy Khan -
Number of replies: 3

DDL sql execution error

When I try to backup my course in Moodle 2.4.3 (Build 20130405) I get the DDL error. 

I contacted my ISP and asked them if I was able to write to the database and they told me that temporary files are not stored on the database, but the file system.

Any idea how to fix this?

Thanks, Sharon.

Average of ratings: -
In reply to Sharon McMenemy Khan

Re: Backup of Courses

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Switch on Debugging and do it again. What is the full error that you (should) now get?

In reply to Howard Miller

Re: Backup of Courses

by Sharon McMenemy Khan -
---------------------------------------------

Debug info: Access denied for user 'web232-moodle-10'@'%' to database 'web232-moodle-10'
CREATE TEMPORARY TABLE backup_ids_temp ( id BIGINT(10) NOT NULL auto_increment, backupid VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'ec43dc7569ccba58f7d4774abce50188', itemname VARCHAR(160) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', itemid BIGINT(10) NOT NULL, newitemid BIGINT(10) NOT NULL DEFAULT 0, parentitemid BIGINT(10), info LONGTEXT CHARACTER SET utf8 COLLATE utf8_bin, CONSTRAINT PRIMARY KEY (id) ) DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_bin Error code: ddlexecuteerror Stack trace: line 432 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown line 860 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure() line 77 of /lib/ddl/database_manager.php: call to database_manager->execute_sql() line 458 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr() line 159 of /backup/util/dbops/backup_controller_dbops.class.php: call to database_manager->create_temp_table() line 106 of /backup/util/dbops/backup_controller_dbops.class.php: call to backup_controller_dbops::create_temptable_from_real_table() line 40 of /backup/moodle2/backup_stepslib.php: call to backup_controller_dbops::create_backup_ids_temp_table() line 34 of /backup/util/plan/backup_execution_step.class.php: call to create_and_clean_temp_stuff->define_execution() line 153 of /backup/util/plan/base_task.class.php: call to backup_execution_step->execute() line 163 of /backup/util/plan/base_plan.class.php: call to base_task->execute() line 110 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()
I've asked my ISP to change the setting so that Moodle can create a temporary file. I haven't heard from them yet! 
Is there any information you can give me that would help me resolve this? 
Thanks, Sharon 
In reply to Sharon McMenemy Khan

Re: Backup of Courses

by Sharon McMenemy Khan -

This was a database issue. I asked my ISP to change the setting and the backup now works.