Closed (fixed)
Project:
Backup and Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2012 at 22:21 UTC
Updated:
10 Jul 2013 at 02:03 UTC
I tried to backup and when I did "Backup Now", I got the following error. All options are left default.
Notice: Undefined index: create table in backup_migrate_destination_db_mysql->_get_table_structure_sql() (line 295 of C:\wamp\www\sites\all\modules\backup_migrate\includes\destinations.db.mysql.inc).
Comments
Comment #1
DrupalDan commentedanyone knows how to fix this?
Comment #2
artatac commentedI added this code in to sort this error. Something to do with a newer version on mysql.
Comment #3
DrupalDan commentedHi artatac, thank you for your response. Sorry but I'm not a programmer and I don't know how to do with the code you posted here. Can you give me some instructions?
Thanks in advance!
Comment #4
DrupalDan commentedI upgrade to 7.x-2.4 but the problem persists
Comment #5
ronan commentedThis sounds a lot like a problem that was fixed last year. Can you confirm this is still happening in the latest code?
Comment #7
nzcodarnoc commentedI am experiencing this error with 7.x-2.7
I also have CiviCRM installed, and have had some problems restoring too, and it makes me wonder if this could be related. So I am mentioning it here.
The problems I had with restored were resolved with this workaround: http://drupal.org/node/1542274#comment-6843466
Comment #8
totocol commentedSame issue here.
Notice: Undefined index: create table in backup_migrate_destination_db_mysql->_get_table_structure_sql() (line 295 of /sites/all/modules/backup_migrate/includes/destinations.db.mysql.inc).
Using dev version now but not helping. I've also tried using the databased backed up but I got errors on the import.
Any ideas?
I'm using MySQL version 5.1.69 and PHP 5.3.25
Thanks in advance. I've tried also uninstalling and installing module again.
Line 295 refers to:
// Remove newlines and convert " to ` because PDO seems to convert those for some reason.
$out .= strtr($create['create table'], array("\n" => ' ', '"' => '`'));
Cheers
UPDATE: I've also tried changing the code to use the code above but still get same error but on a different line:
Notice: Undefined index: create table in backup_migrate_destination_db_mysql->_get_table_structure_sql() (line 302 of sites/all/modules/backup_migrate/includes/destinations.db.mysql.inc).
Comment #9
nzcodarnoc commentedChiming in again as I've run up this again. Again with CiviCRM and Drupal.
The problem this time seems to be the SQL VIEWS that CiviCRM creates are not recognised as views by backup_migrate.
So I created a custom migration and set it to ignore the following views (which are listed as tables in the UI):
Comment #10
nzcodarnoc commentedAm I "allowed" to re-open this ticket? Is there interest in this module being made compatible with CiviCRM? I seem to have some energy to look at it.
Comment #11
SharonD214@aol.com commentedI'm having the same issue but on drupal installs with Webform mySQL views databases, I don't have CiviCRM.
Sharon
Comment #12
nzcodarnoc commentedHey Sharon,
Without looking into it my feeling is that the error might be being caused by the same problem facing CiviCRM, which is the modules inability to understand the difference between a SQL table and an SQL view.
My suggestion is to go into the advanced setting and exclude any of the webform views that you have created from the backup.
Comment #13
SharonD214@aol.com commentednzcodarnoc - You are correct, No error if I don't try to backup those tables. Now I just have to hope that I never need to restore them :(
Sharon
Comment #14
nzcodarnoc commentedHey there,
Note, it can be a bit tricky talking about SQL views in a Drupal context, because of the confusion with the "Views module". In this reply I am only making reference to SQL views.
It shouldn't be a problem. SQL views don't contain any data, they are more like a stored query. So if you need to restore you site the definition of those views is likely to be stored along with the webform views module. Worst case you'd have to recreate those views through the modules UI. But all the webform data would be safe.
Here's some more reading about SQL views: http://www.w3schools.com/sql/sql_view.asp