drupal restore ok. mysql restore fails

billybob4 - September 26, 2008 - 13:13
Project:backup
Version:5.x-3.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi.

I'm not sure if this is a bug or a support request. Possibly the latter :)

I'm trying out the backup module and (wisely) decided to test it actually worked on my setup.

Backup procedure reported no errors. i donwloaded the tar file created and setup a new subdomain to try the restore.

Untarred/unzipped the tar file in the new domain and all looks well. Unzipped the sql backup - no problem
Created new empty database
Tried to insert the backup content into the new database fails with:

ERROR 1062 (23000) at line 232: Duplicate entry '0:en' for key 1

Any ideas most welcome.

Thanks

p.s. a bit more info.

I had a look at the new database using phpMyadmin and found that 39 of the 77 tables had been created.
They seem to be created in alphabetical order and the last one to be successfully created is node_comment_statistic (both original and this new backup version have the same amount of rows in this table so I'm assuming that one is ok).

The next one in the list would be node_counter. I'm guessing this must be where it's choking

#1

billybob4 - September 26, 2008 - 13:27

Hmm.

I think I was wrong about it choking on node_counter table.

Line 232 in the backup sql file starts like this:

INSERT INTO `cache_menu` VALUES ('0:en','a:4:{s:10:\"path index\";a:196:{s:21:\"admin/content/webform\";s:3:\"130\";s:22:.......

That '0:en' specifically gets mentioned in the mysql error message, so I think this is a problem with the cache_menu table instead?

Indeed that table has only one entry in on the half completed backup version (0:en) and has 5 entries in the correct version.

I've done a search on the whole backup sql file for another instance of '0:en' and it only appears once, so I don't know why it should be reporting a 'duplicate entry'

I've attached screenshots of the mysql browse menu_cahce tabel for the original and the failed restore versions

AttachmentSize
working_original.jpg 80.16 KB
broken_restore.jpg 52.37 KB
 
 

Drupal is a registered trademark of Dries Buytaert.