Score:1

Problems in collations when restoring

ng flag

I'm quite lost with this issue I'm experiencing, so any clue will be appreciated. Let's start with the "symptoms".

Whenever I restore a Drupal 7 site that has been previously backed up with drush archive-dump (Drush 5.10), I get this in the panels page:

Notice: unserialize(): Error at -- of -- bytes in _ctools_export_unpack_object()

As a result, all the information in that panels page is gone in the anonymous version of the page.

I'm quite sure it has to do with some collation or charset problem. Some hints:

  • It all started when I had to change the collation of databases so that I could include some emojis in metatags descriptions. As far as I'm concerned databases collations and charsets can be established at different levels. I changed the production site collations using the method described here and from that time on, drush archive-dump/archive-restore started throwing the error above.
  • I don't have that problem when I restore a drush archive-dump backup made before the collation upgrade described in the previous list item
  • I don't have that problem either if I use the next code instead of drush:
mysql -u root -e "CREATE DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
mysqldump -uroot -password --default-character-set=utf8mb4 databasename_to_backup > databasename.sql
mysql -uroot -password --default-character-set=utf8mb4 databasename < databasename.sql

I'm quite lost. I've been trying different approaches but none of them work. What I'd like:

  • Having drush archive-dump/archiv-restore working properly from now on
  • If possible, fix the problem with those backups already dumped using drush

Thanks for your time, and hope you can understand everything.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.