Email states backups not done

Email states backups not done

by Annie Price -
Number of replies: 5

Hi,

I have just upgraded to 2.23+

I got this email ...

Summary ==================================================  

Courses: 32   OK: 0  
Skipped: 0  
Error: 32  
Unfinished: 0
 
Some of your courses weren't saved!!

When you click on the link there is an error next to each of the 32 courses but doesn't say what the error is.

Can anyone help please?

Average of ratings: -
In reply to Annie Price

Re: Email states backups not done

by Annie Price -

Hi Again,

The cron for the backup this morning says ....

backup_auto_failed_on_course MYSITE Home
Exception:
ddlexecuteerror
backup_auto_failed_on_course COURSE1
Exception:
ddltablealreadyexists backup_ids_temp

Can anyone help please

In reply to Annie Price

Re: Email states backups not done

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Annie,

I just tried searching moodle.org for 'backup_ids_temp' and came up with Eloy's post in the discussion http://moodle.org/mod/forum/discuss.php?d=197181 which is hopefully some help to you.

Average of ratings: Useful (1)
In reply to Helen Foster

Re: Email states backups not done

by Annie Price -

Hi Helen,

Thanks for the link, much appreciated.

I have posted at the end of the discussion so hopefully I may get it sorted soon.

In reply to Annie Price

Re: Email states backups not done

by Annie Price -

Hi

Someone suggested that I turn on debugging so that I could post the problem of why backups were failing.

This is the output for a manual backup

Debug info: Access denied for user 'web167-course22'@'%' to database 'web167-course22' CREATE TEMPORARY TABLE mdl_backup_ids_temp (     id BIGINT(10) unsigned NOT NULL auto_increment,     backupid VARCHAR(32) NOT NULL DEFAULT '57c951b3e8e457c62eeead432c862128',     itemname VARCHAR(160) NOT NULL DEFAULT '',     itemid BIGINT(10) unsigned NOT NULL,     newitemid BIGINT(10) unsigned NOT NULL DEFAULT 0,     parentitemid BIGINT(10) unsigned,     info MEDIUMTEXT, CONSTRAINT  PRIMARY KEY (id) )
Stack trace:
  • line 400 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 669 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 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
  • line 499 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 39 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 148 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 have no idea what any of that means or how to fix it

Can anyone help?

In reply to Annie Price

Re: Email states backups not done (Resolved)

by Annie Price -

Hi

I have finally resolved this issue.  It seems there are some required changes to the database when upgrading to 2+ as stated here http://docs.moodle.org/20/en/Upgrading_to_Moodle_2.0#Required_changes_in_database_privileges

After trying for hourse to fix this with the following advice ...

the command to execute by one database admin user would be:

GRANT
CREATE TEMPORARY TABLES ON  `moodle` . * TO  'moodleuser'@'localhost';

■DATABASENAME:
Specify the name of the database ('moodle' given the error you pasted
above).
■USERNAME: Specify the name of the database user ('moodleuser' given
the error you pasted above).
■HOST: Specify the hosts from which that user
can connect ('localhost' given the error pasted above).

However, when I
try this on my database I get the following error ...

#1044 - Access
denied for user 'web167-course22'@'%'
to database 'web167-course22'

I contacted my hosting providers and it seems they needed to be the ones to grant the permissions.

I hope this information helps anyone else who is having the same problem.

Average of ratings: Useful (1)